forked from GoogleCloudPlatform/spanner-migration-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·32 lines (24 loc) · 830 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
#!/usr/bin/env bash
set -e
if [ $# -eq 0 ]
then
echo "No version supplied. Run \`make release VERSION=X.X\`"
exit 1
fi
version=$1
if ! echo $version | grep -Eq "^[0-9]+\.[0-9]+\.[0-9]+$"
then
echo "Invalid version: ${version}"
echo "Please specify a semantic version with no prefix (e.g. X.X.X)."
exit 1
fi
echo "Version is semantically valid, please ensure that it is the next version as per SemVer..."
echo "Verifying that all tests pass..."
make test
echo "Verifying that spanner-migration-tool binary can be built..."
make build-static
echo "Creating Github tag v${version}"
git tag "v${version}"
git push origin "v${version}"
echo "Github tag v${version} created"
echo "Create a new release by visiting https://github.com/GoogleCloudPlatform/spanner-migration-tool/releases/new?tag=v${version}&title=v${version}"