From 5718bedfda35b2ac39be98ddb1673c20fceca82f Mon Sep 17 00:00:00 2001 From: Howard Lewis Ship Date: Thu, 17 Oct 2024 16:25:58 -0700 Subject: [PATCH] Prep for 1.3 --- .gitignore | 2 ++ CHANGELOG.md | 2 +- build.clj | 33 ++++++++++++++++++--------------- deps.edn | 10 ++++------ 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index d4a05a6..b3b6408 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ resources/graphiql/ .clj-kondo .settings .vscode +.lsp/ +*.asc \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cddc80..00a91ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.3 -- 12 Jul 2024 +## 1.3 -- 17 Oct 2024 *BREAKING CHANGES* diff --git a/build.clj b/build.clj index ffb1d92..b9509ba 100644 --- a/build.clj +++ b/build.clj @@ -15,21 +15,20 @@ ;; clj -T:build (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" @@ -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]})) diff --git a/deps.edn b/deps.edn index c9a180d..d10c527 100644 --- a/deps.edn +++ b/deps.edn @@ -37,14 +37,12 @@ :exec-fn cognitect.test-runner.api/test} ;; clj -T:build - - :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"