Skip to content

Commit

Permalink
Last batch of deploy tweaks/fixes (#362)
Browse files Browse the repository at this point in the history
* Fix typo in deploy setup

* Add an assert

* Also lint deploy script

* Fail more informatively

* Dissoc CLASSPATH

* Add changelog entry
  • Loading branch information
vemv committed Feb 6, 2022
1 parent 20c939f commit 7930b3b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
21 changes: 14 additions & 7 deletions .circleci/deploy/deploy_release.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7930b3b

Please sign in to comment.