File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,16 @@ workflows:
38
38
branches :
39
39
only :
40
40
- " master"
41
- - ' /^v\d+\.\d+\.x/'
41
+ - ' /^v\d+\.\d+\.x/' # E.g. v4.13.x
42
+
43
+ release :
44
+ jobs :
45
+ - check_version :
46
+ filters : # Only runs on tag such as v3.0.23
47
+ branches :
48
+ ignore : ' /.*/'
49
+ tags :
50
+ only : ' /^v\d+\.\d+\.\d+/'
42
51
43
52
44
53
# Execute a set of commands in a clean image
@@ -131,6 +140,21 @@ jobs:
131
140
git_email : " BotEcole@users.noreply.github.com"
132
141
ssh_fingerprints : " a9:13:fc:02:79:6c:60:8a:72:b1:c3:87:6c:5e:06:32"
133
142
143
+ check_version :
144
+ docker :
145
+ - image : " cimg/base:2020.12"
146
+ auth : *dockerhub_auth
147
+ steps :
148
+ - checkout
149
+ - run :
150
+ name : " Verifiying version file matches tag"
151
+ command : |
152
+ for part in 1 2 3 ; do
153
+ tag_part="$( echo $CIRCLE_TAG | sed s/v// | cut -d '.' -f $part )"
154
+ file_part="$( sed $part'q;d' VERSION | cut -d ' ' -f 2 )"
155
+ [ $tag_part -eq $file_part ]
156
+ done
157
+
134
158
135
159
# Reusable set of instructions to be used in jobs
136
160
commands :
You can’t perform that action at this time.
0 commit comments