-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·37 lines (28 loc) · 1.06 KB
/
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
#! /usr/bin/env bash
set -e -u -o pipefail
if [ "$#" -lt 1 ] ; then
echo Usage: release.sh VERSION
echo VERSION should be something like 1.0.3
exit 1
fi
version="$1"
version_tag="v$version"
echo "-------------------------------------------------------------------------"
echo "Creating release for version $version"
echo "-------------------------------------------------------------------------"
srcdir="$GOPATH/src/github.com/stathat/cmd"
cd $srcdir
if git tag -a $version_tag -m $version_tag ; then
echo "Tagged stathat/cmd repo with $version_tag"
git push --tags
else
echo "git tag $version_tag failed on $srcdir, presumably it exists"
fi
echo "-------------------------------------------------------------------------"
echo "Using goreleaser to make release for $version"
echo "-------------------------------------------------------------------------"
cd stathat
goreleaser
echo "-------------------------------------------------------------------------"
echo "Release for $version done"
echo "-------------------------------------------------------------------------"