2017-01-25 12:09:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-05-28 10:40:35 +00:00
|
|
|
# Updates the Version variables, commits, tags, signs and "gx release" the package
|
|
|
|
|
|
|
|
set -e
|
2018-05-28 10:42:09 +00:00
|
|
|
set -x
|
2017-01-25 12:09:36 +00:00
|
|
|
|
|
|
|
version="$1"
|
|
|
|
|
|
|
|
if [ -z $version ]; then
|
|
|
|
echo "Need a version!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-12-11 13:10:16 +00:00
|
|
|
make gx-clean
|
2018-09-26 15:45:02 +00:00
|
|
|
sed -i "s/Version = semver\.MustParse.*$/Version = semver.MustParse(\"$version\")/" version.go
|
2018-10-01 14:34:22 +00:00
|
|
|
sed -i "s/const Version.*$/const Version = \"$version\"/" cmd/ipfs-cluster-ctl/main.go
|
2017-11-15 22:54:31 +00:00
|
|
|
git commit -S -a -m "Release $version"
|
2018-03-29 11:47:33 +00:00
|
|
|
lastver=`git tag -l | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+$' | tail -n 1`
|
2017-11-15 22:39:22 +00:00
|
|
|
echo "Tag for Release ${version}" > tag_annotation
|
|
|
|
echo >> tag_annotation
|
|
|
|
git log --pretty=oneline ${lastver}..HEAD >> tag_annotation
|
|
|
|
git tag -a -s -F tag_annotation v$version
|
2017-12-11 13:05:26 +00:00
|
|
|
rm tag_annotation
|
2017-01-25 12:09:36 +00:00
|
|
|
gx release $version
|