Skip to content

Commit

Permalink
Prep for 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hlship committed Oct 17, 2024
1 parent 075bcdc commit 5718bed
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ resources/graphiql/
.clj-kondo
.settings
.vscode
.lsp/
*.asc
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.3 -- 12 Jul 2024
## 1.3 -- 17 Oct 2024

*BREAKING CHANGES*

Expand Down
33 changes: 18 additions & 15 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@
;; clj -T:build <var>

(ns build
(:require [clojure.tools.build.api :as api]
[net.lewisship.build :as b]))
(:require [clojure.tools.build.api :as b]
[net.lewisship.build :refer [requiring-invoke]]))

(def lib 'com.walmartlabs/lacinia-pedestal)
(def version "1.3")

(def project-opts
{:project-name lib
:version version})
(def jar-params {:project-name lib
:version version})

(def class-dir "target/classes")

(defn clean
[_]
(api/delete {:path "target"}))
(b/delete {:path "target"}))

(def ^:private graphiql-files
{"graphiql/graphiql.min.js" "graphiql.min.js"
Expand All @@ -43,27 +42,31 @@
"Runs `npm install` and copies necessary files into class-dir."
[_]
(let [{:keys [exit] :as process-result}
(api/process {:command-args ["npm" "ci"]
:dir "node"})]
(b/process {:command-args ["npm" "ci"]
:dir "node"})]
(when-not (zero? exit)
(throw (ex-info "npm install failed"
process-result)))
(doseq [[node-path resource-name] graphiql-files
:let [in-path (str "node/node_modules/" node-path)
out-path (str class-dir "/graphiql/" resource-name)]]
(api/copy-file {:src in-path :target out-path}))))
(b/copy-file {:src in-path :target out-path}))))

(defn clean
[_params]
(b/delete {:path "target"}))

(defn jar
[_params]
(clean nil)
(prep nil)
(b/create-jar project-opts))
(requiring-invoke net.lewisship.build.jar/create-jar jar-params))

(defn deploy
[_params]
(clean nil)
(b/deploy-jar (jar nil)))
(requiring-invoke net.lewisship.build.jar/deploy-jar (jar jar-params)))

(defn codox
[_params]
(b/generate-codox project-opts))
(requiring-invoke net.lewisship.build.codox/generate
{:project-name lib
:version version
:aliases [:dev]}))
10 changes: 4 additions & 6 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
:exec-fn cognitect.test-runner.api/test}

;; clj -T:build <command>

:build
{:deps
{io.github.hlship/build-tools {:git/tag "0.10.2" :git/sha "3c446e4"}}
:ns-default build}}
:build {:deps {io.github.hlship/build-tools {:git/tag "0.10.2" :git/sha "3c446e4"}}
:ns-default build}}

:net.lewisship.build/scm
{:url "https://github.com/walmartlabs/lacinia-pedestal"}
{:url "https://github.com/walmartlabs/lacinia-pedestal"
:license :asl}

:codox/config
{:description "Expose Lacinia GraphQL as Pedestal endpoints"
Expand Down

0 comments on commit 5718bed

Please sign in to comment.