-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrelease.sh
executable file
·50 lines (37 loc) · 961 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
# Publish a qserv-ingest release
# TODO use https://github.com/toshimaru/nyan/blob/main/.github/workflows/release.yml
# @author Fabrice Jammes, IN2P3
set -euxo pipefail
releasetag=""
DIR=$(cd "$(dirname "$0")"; pwd -P)
usage() {
cat << EOD
Usage: `basename $0` [options] RELEASE_TAG
Available options:
-h this message
Create a kind-helper release tagged "RELEASE_TAG"
RELEASE_TAG must have the semver format.
EOD
}
# get the options
while getopts ht: c ; do
case $c in
h) usage ; exit 0 ;;
\?) usage ; exit 2 ;;
esac
done
shift `expr $OPTIND - 1`
if [ $# -ne 1 ] ; then
usage
exit 2
fi
releasetag=$1
# TODO update VERSION in README.md
sed -i "s/^KINDHELPER_VERSION=.*$/KINDHELPER_VERSION='$releasetag'/" $DIR/install.sh
git add .
git commit -m "Publish release $releasetag"
git tag -a "$releasetag" -m "Version $releasetag"
git push --follow-tags
rm -rf $DIR/dist
goreleaser release