Skip to content

Commit be81abf

Browse files
committedMar 22, 2024
Ensure that CIRCLE_TAG and the version in project.clj agrees
Also verify there is a CHANGELOG entry for that version before it will publish to Clojars. The motivation for this change is that when I pushed the tag 0.10.1, I ended up publishing version 0.10.0 to Clojars, because I had forgotten to update project.clj first.
1 parent 0a4277c commit be81abf

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed
 

‎.circleci/config.yml

+13
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ jobs:
3232
<<: *defaults
3333
steps:
3434
- checkout
35+
- run: |
36+
# Grab the numerical version of the tag
37+
tag_version=${CIRCLE_TAG#v}
38+
39+
# Extract the version from the project.clj
40+
project_version=$(awk 'NR==1 {print $3}' project.clj | sed -e 's/"//g')
41+
42+
# Fail if the tags do not match
43+
test ${tag_version} = ${project_version} || exit 1
44+
45+
# Fail if the tag version is not in CHANGELOG
46+
grep "^Version" CHANGELOG.md | grep "${tag_version}" || exit 1
47+
3548
- run: lein deps
3649
- run: lein deploy
3750

‎CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 0.10.2 (March 22, 2024)
2+
================================
3+
4+
Code identical to 0.10.0 or 0.10.1, this is just a fix to the automatic release workflow.
5+
16
Version 0.10.1 (March 22, 2024)
27
================================
38

‎project.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject circleci/analytics-clj "0.10.0"
1+
(defproject circleci/analytics-clj "0.10.2"
22
:description "Idiomatic Clojure wrapper for the Segment.io 2.x Java client"
33
:url "https://github.com/circleci/analytics-clj"
44
:license {:name "Eclipse Public License"

0 commit comments

Comments
 (0)
Failed to load comments.