Udapte latest release
This commit is contained in:
parent
fb150bb9b0
commit
6dc2cf234a
1 changed files with 12 additions and 4 deletions
|
@ -14,11 +14,19 @@
|
|||
set -o errexit -o nounset -o pipefail
|
||||
|
||||
# Set Starterkit version
|
||||
STARTER_KIT_VERSION="v0.0.1"
|
||||
STARTER_KIT_VERSION="latest"
|
||||
|
||||
curl -L\
|
||||
if [ "$STARTER_KIT_VERSION" == "latest" ]; then
|
||||
|
||||
LOCATION=$(curl -s https://api.github.com/repos/Orange-OpenSource/AWSTerraformStarterKit/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print "https://github.com/Orange-OpenSource/AWSTerraformStarterKit/archive/" substr($2, 2, length($2)-3) ".zip"}') \
|
||||
; curl -L -o /tmp/archive.zip "$LOCATION"
|
||||
else
|
||||
curl -L\
|
||||
"https://github.com/Orange-OpenSource/AWSTerraformStarterKit/archive/refs/tags/${STARTER_KIT_VERSION}.zip" \
|
||||
-o /tmp/archive.zip
|
||||
-o /tmp/archive.zip
|
||||
fi
|
||||
|
||||
unzip /tmp/archive.zip -d .
|
||||
cp -r AWSTerraformStarterKit-*/. .
|
||||
|
|
Loading…
Reference in a new issue