From 7930b3bc4de89f858f31c00d55e1f3fb9e8c07bf Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 6 Feb 2022 13:22:24 +0100 Subject: [PATCH] Last batch of deploy tweaks/fixes (#362) * Fix typo in deploy setup * Add an assert * Also lint deploy script * Fail more informatively * Dissoc CLASSPATH * Add changelog entry --- .circleci/config.yml | 2 +- .circleci/deploy/deploy_release.clj | 21 ++++++++++++++------- CHANGELOG.md | 6 +++++- Makefile | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 84c7b9c4..1f7ca52c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,7 +143,7 @@ jobs: - run: name: Deploy command: | - lein with-profile -user,+deploy run -m deploy-relase make deploy + lein with-profile -user,+deploy run -m deploy-release make deploy test_code: description: | diff --git a/.circleci/deploy/deploy_release.clj b/.circleci/deploy/deploy_release.clj index d7f2dbf7..996b2a02 100644 --- a/.circleci/deploy/deploy_release.clj +++ b/.circleci/deploy/deploy_release.clj @@ -16,15 +16,22 @@ (defn -main [& _] (let [tag (System/getenv "CIRCLE_TAG")] (if-not tag - (System/exit 1) + (do + (println "No CIRCLE_TAG found.") + (System/exit 1)) (if-not (re-find (re-pattern release-marker) tag) - (System/exit 1) - (let [version (make-version tag)] - (spit (io/file "resources" "refactor_nrepl" "version.edn") - (pr-str version)) + (do + (println (format "The `%s` marker was not found in %s." release-marker tag)) + (System/exit 1)) + (let [version (make-version tag) + version-file (io/file "resources" "refactor_nrepl" "version.edn")] + (assert (.exists version-file)) + (spit version-file (pr-str version)) (apply println "Executing" *command-line-args*) - (->> [:env (assoc (into {} (System/getenv)) - "PROJECT_VERSION" (make-version tag))] + (->> [:env (-> {} + (into (System/getenv)) + (assoc "PROJECT_VERSION" (make-version tag)) + (dissoc "CLASSPATH"))] (into (vec *command-line-args*)) (apply sh) log-result diff --git a/CHANGELOG.md b/CHANGELOG.md index 22f9a888..998c2da1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ ## Unreleased -## 3.2.1 (2022-01-21) +## 3.2.2 (2022-01-29) + +* Fix a minor artifact in the previous release (the version would be reported as 0.0.0). + +## 3.2.1 (2022-01-29) * Upgrade Orchard. diff --git a/Makefile b/Makefile index f445bb45..078cd528 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ cljfmt-fix: lein with-profile -user,+$(VERSION),+cljfmt cljfmt fix eastwood: - lein with-profile -user,+$(VERSION),+eastwood eastwood + lein with-profile -user,+$(VERSION),+deploy,+eastwood eastwood kondo: lein with-profile -dev,+$(VERSION),+clj-kondo run -m clj-kondo.main --lint src test