forked from 7Cav/SandboxAndTrainingMissionGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·30 lines (23 loc) · 1.04 KB
/
deploy.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
#!/bin/sh
set -e
VERSION_TAG=$*
echo "Checking and downloading latest version of cScripts..."
PACKAGE_TAG=$(curl -fs "https://api.github.com/repos/7Cav/cScripts/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"([^"]+)".*/\1/')
for i in 1 2 3 4 5; do
curl -sOL "https://github.com/7Cav/cScripts/releases/download/$PACKAGE_TAG/cScripts-$PACKAGE_TAG.zip"
sleep 3
if [ -f "cScripts-$PACKAGE_TAG.zip" ]; then
echo cScripts-$PACKAGE_TAG.zip successfully downloaded...
break
else
echo Failed to download cScripts-$PACKAGE_TAG.zip trying again...
fi
sleep 15
done
#echo Downloading training missions...
#git clone https://github.com/7Cav/7thCavalry_Training_Missions.git template/training/
python3 build.py sandbox -p cScripts-$PACKAGE_TAG.zip -pv $PACKAGE_TAG -v ${VERSION_TAG} -y
python3 build.py sandbox -s setup_NoRadios.json -o noradio -p cScripts-$PACKAGE_TAG.zip -pv $PACKAGE_TAG -v ${VERSION_TAG} -y
#python3 build.py training -p cScripts-$PACKAGE_TAG.zip -pv $PACKAGE_TAG -v ${VERSION_TAG} -y