-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
tars-deploy-tars.sh
executable file
·30 lines (23 loc) · 862 Bytes
/
tars-deploy-tars.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/bash
if (( $# < 2 ))
then
echo $#
echo "$0 tag push(false/true)"
exit 1
fi
tag=$1
push=$2
if [ "$push" == "true" ]; then
push="true"
else
push="false"
fi
# tarsTag=$(git describe --tags $(git rev-list --tags --max-count=1) --abbrev=0 --always)
# cd framework && frameworkTag=$(git describe --tags $(git rev-list --tags --max-count=1) --abbrev=0 --always) && cd ..
# cd web && webTag=$(git describe --tags $(git rev-list --tags --max-count=1) --abbrev=0 --always) && cd ..
tarsTag=$tag
cd framework && frameworkTag=$(git reflog HEAD | grep 'checkout:' | head -1 | awk '{print $NF}') && cd ..
cd web && webTag=$(git reflog HEAD | grep 'checkout:' | head -1 | awk '{print $NF}') && cd ..
echo "starting tars:${tarsTag} framework:$frameworkTag web:$webTag deploy"
cd docker/tars
./build-docker.sh $frameworkTag $webTag ${tarsTag} ${push}