forked from GoogleCloudPlatform/terraform-google-conversion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·29 lines (22 loc) · 749 Bytes
/
release.sh
File metadata and controls
executable file
·29 lines (22 loc) · 749 Bytes
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
#!/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 "Listing supported resources to ${version}-resources.txt"
make build
./bin/tfplan2cai list-supported-resources > tgc-${version}-resources.txt
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/terraform-google-conversion/releases/new?tag=v${version}&title=v${version}"