@@ -39,7 +39,7 @@ setup() {
39
39
else
40
40
echo " Cannot determine version - multiple tags point at HEAD:" >&2
41
41
for TAG in $HEAD_TAGS ; do
42
- echo -e " \t$TAG " >&2
42
+ echo -e " \\ t$TAG " >&2
43
43
done
44
44
exit 1
45
45
fi
@@ -65,8 +65,8 @@ build() {
65
65
66
66
echo " == Clone repo at $LATEST_TAG for version $VERSION "
67
67
if [ -d " $RELEASE_DIR " ]; then
68
- echo -e " \u2757 Release directory $RELEASE_DIR already exists, you may want to" >&2
69
- echo -e " \trm -rf $RELEASE_DIR " >&2
68
+ echo -e " \\ u2757 Release directory $RELEASE_DIR already exists, you may want to" >&2
69
+ echo -e " \\ trm -rf $RELEASE_DIR " >&2
70
70
exit 1
71
71
fi
72
72
@@ -78,7 +78,7 @@ build() {
78
78
# # Check that the top changelog entry is this version
79
79
if ! latest_changelog=$( perl -nle' print $& if m{(?<=^## Release ).*}' ./CHANGELOG.md | head -1) \
80
80
|| ! [ " $latest_changelog " = " $VERSION " ]; then
81
- echo -e " \u2757 Latest changelog entry \" $latest_changelog \" does not match the release version $VERSION " >&2
81
+ echo -e " \\ u2757 Latest changelog entry \" $latest_changelog \" does not match the release version $VERSION " >&2
82
82
exit 1
83
83
fi
84
84
@@ -93,7 +93,7 @@ build() {
93
93
if make tests SUDO=" $SUDO " ; then
94
94
echo -e ' \u2713 Tests pass'
95
95
else
96
- echo -e " \u2757 Tests failed, probably best not publish this one" >&2
96
+ echo -e " \\ u2757 Tests failed, probably best not publish this one" >&2
97
97
exit 1
98
98
fi
99
99
@@ -119,20 +119,20 @@ draft() {
119
119
120
120
# # Check that the tag exists by looking at github
121
121
if ! curl -sSf " https://api.github.com/repos/$GITHUB_USER /scope/git/tags/$LATEST_TAG_SHA " > /dev/null 2>&1 ; then
122
- echo -e " \u2757 Tag $LATEST_TAG is not on GitHub, or is not the same as the local tag" >&2
123
- echo -e " \thttps://github.com/$GITHUB_USER /scope/tags" >&2
122
+ echo -e " \\ u2757 Tag $LATEST_TAG is not on GitHub, or is not the same as the local tag" >&2
123
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/tags" >&2
124
124
echo " You may need to" >&2
125
- echo -e
" \tgit push [email protected] :$GITHUB_USER /scope $LATEST_TAG "
125
+ echo -e
" \\ tgit push [email protected] :$GITHUB_USER /scope $LATEST_TAG "
126
126
exit 1
127
127
fi
128
128
129
- echo -e " \u2713 Tag $LATEST_TAG exists in GitHub repo $GITHUB_USER /scope"
129
+ echo -e " \\ u2713 Tag $LATEST_TAG exists in GitHub repo $GITHUB_USER /scope"
130
130
131
131
# # Check that the version does not already exist by looking at github
132
132
# # releases
133
133
if github-release info --user " $GITHUB_USER " --repo scope --tag " $LATEST_TAG " > /dev/null 2>&1 ; then
134
- echo -e " \u2757 Release $LATEST_TAG already exists on GitHub" >&2
135
- echo -e " \thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG " >&2
134
+ echo -e " \\ u2757 Release $LATEST_TAG already exists on GitHub" >&2
135
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG " >&2
136
136
exit 1
137
137
fi
138
138
@@ -144,7 +144,7 @@ draft() {
144
144
fi
145
145
146
146
echo " == Creating GitHub release $RELEASE_ARGS $RELEASE_NAME $VERSION "
147
- github-release release $RELEASE_ARGS \
147
+ github-release release " $RELEASE_ARGS " \
148
148
--user " $GITHUB_USER " \
149
149
--repo scope \
150
150
--tag " $LATEST_TAG " \
@@ -159,7 +159,7 @@ draft() {
159
159
--file " ./scope"
160
160
161
161
echo " ** Draft $TYPE $RELEASE_NAME $VERSION created at"
162
- echo -e " \thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG "
162
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG "
163
163
}
164
164
165
165
publish () {
@@ -177,22 +177,22 @@ publish() {
177
177
--tag " $LATEST_TAG "
178
178
179
179
echo " ** Pre-release $RELEASE_NAME $VERSION published at"
180
- echo -e " \thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG "
180
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG "
181
181
else
182
182
echo " == Sanity checks"
183
183
if ! [ " $LATEST_TAG_COMMIT_SHA " == " $LATEST_RELEASE_COMMIT_SHA " ]; then
184
- echo -e " \u2757 The tag latest_release does not point to the same commit as $LATEST_TAG " >&2
184
+ echo -e " \\ u2757 The tag latest_release does not point to the same commit as $LATEST_TAG " >&2
185
185
echo " You may need to" >&2
186
- echo -e " \tgit tag -af latest_release $LATEST_TAG " >&2
186
+ echo -e " \\ tgit tag -af latest_release $LATEST_TAG " >&2
187
187
exit 1
188
188
fi
189
189
190
190
# # Check that the 'latest_release' tag exists by looking at github
191
191
if ! curl -sSf " https://api.github.com/repos/$GITHUB_USER /scope/git/tags/$LATEST_RELEASE_SHA " > /dev/null 2>&1 ; then
192
- echo -e " \u2757 Tag latest_release is not on GitHub, or is not the same as the local tag" >&2
193
- echo -e " \thttps://github.com/$GITHUB_USER /scope/tags" >&2
192
+ echo -e " \\ u2757 Tag latest_release is not on GitHub, or is not the same as the local tag" >&2
193
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/tags" >&2
194
194
echo " You may need to" >&2
195
- echo -e
" \tgit push -f [email protected] :$GITHUB_USER /scope latest_release" >&2
195
+ echo -e
" \\ tgit push -f [email protected] :$GITHUB_USER /scope latest_release" >&2
196
196
exit 1
197
197
fi
198
198
echo ' ** Sanity checks OK for publishing tag' " $LATEST_TAG " as " $DOCKERHUB_USER /scope:$VERSION "
@@ -229,8 +229,8 @@ publish() {
229
229
--file " ./scope"
230
230
231
231
echo " ** Release $RELEASE_NAME $VERSION published at"
232
- echo -e " \thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG "
233
- echo -e " \thttps://github.com/$GITHUB_USER /scope/releases/latest_release"
232
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/releases/$LATEST_TAG "
233
+ echo -e " \\ thttps://github.com/$GITHUB_USER /scope/releases/latest_release"
234
234
fi
235
235
}
236
236
@@ -254,19 +254,19 @@ push_images() {
254
254
255
255
usage () {
256
256
echo " Usage:"
257
- echo -e " \t./bin/release build"
257
+ echo -e " \\ t./bin/release build"
258
258
echo " -- Build artefacts for the latest version tag"
259
- echo -e " \t./bin/release draft"
259
+ echo -e " \\ t./bin/release draft"
260
260
echo " -- Create draft release with artefacts in GitHub"
261
- echo -e " \t./bin/release publish"
261
+ echo -e " \\ t./bin/release publish"
262
262
echo " -- Publish the GitHub release and update DockerHub"
263
263
exit 1
264
264
}
265
265
266
266
# Ensure required tooling is installed
267
- if ! which github-release > /dev/null; then
267
+ if ! command -v github-release > /dev/null; then
268
268
echo " Please install git-release:" >&2
269
- echo -e " \tgo get github.com/weaveworks/github-release" >&2
269
+ echo -e " \\ tgo get github.com/weaveworks/github-release" >&2
270
270
echo " and create a git token per https://github.com/weaveworks/github-release" >&2
271
271
exit 1
272
272
fi
0 commit comments