Skip to content

Commit eaa1d48

Browse files
committed
Encode release naming strategy as a small shell script
1 parent c71b072 commit eaa1d48

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

release_tag.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
#
3+
# release_tag - print the name to use for tagging a release.
4+
#
5+
# The release tag format is vGAWK_VERSION+BUILD_HASH.
6+
# GAWK_VERSION is Gawk's MAJOR.MINOR.PATCH version number.
7+
# BUILD_HASH is the Git hash of the commit being tagged;
8+
# inclusion of some build system version information enables us to
9+
# make updates to the build process and then to release new builds
10+
# of Gawk versions we have already made releases of previously.
11+
#
12+
set -euo pipefail
13+
14+
release_name() {
15+
echo -n 'v'
16+
bazel run '--ui_event_filters=-info,-stdout,-stderr' --noshow_progress @gawk -- --version | sed -n 1p | grep -Eo 'GNU Awk (\d+[.]\d+[.]\d+)' | cut -c9- | tr -d '\n'
17+
echo -n '+'
18+
git rev-parse HEAD | cut -c-8
19+
}
20+
21+
release_name

0 commit comments

Comments
 (0)