-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync_code.sh
executable file
·71 lines (52 loc) · 1.63 KB
/
sync_code.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#set -e
ReleaseVersion=$1
CURRDIR="$(pwd)/.."
echo $CURRDIR
if [[ $ReleaseVersion =~ v.* ]];then
echo "ReleaseVersion: $ReleaseVersion"
else
ReleaseVersion=''
fi
cd $CURRDIR/aws-gcr-qc-life-science/
git pull
if [[ -n $ReleaseVersion ]];then
if git tag -a $ReleaseVersion -m "new release $ReleaseVersion"; then
git push origin $ReleaseVersion
echo ""
else
echo "tag $ReleaseVersion already exist, please remove it and try again"
echo " git tag -d $ReleaseVersion"
echo " git push origin :refs/tags/$ReleaseVersion"
exit 1
fi
fi
cp $CURRDIR/aws-gcr-qc-life-science/README.md $CURRDIR/aws-gcr-qc-life-science-public/
cp $CURRDIR/aws-gcr-qc-life-science/performance.md $CURRDIR/aws-gcr-qc-life-science-public/
cp -r $CURRDIR/aws-gcr-qc-life-science/protein $CURRDIR/aws-gcr-qc-life-science-public/
cd $CURRDIR/aws-gcr-qc-life-science/cdk
./synth_cf_s3.sh $ReleaseVersion
cd $CURRDIR/aws-gcr-qc-life-science/protein/ligand-unfolding/batch-experiment/cf
./cf_to_s3.sh $ReleaseVersion
cd $CURRDIR/aws-gcr-qc-life-science-public/
git pull
pwd
git status
git add .
git commit -a -m 'new release'
git push
if [[ -n $ReleaseVersion ]];then
if git tag -a $ReleaseVersion -m "new release $ReleaseVersion"; then
git push origin $ReleaseVersion
echo ""
else
echo "tag $ReleaseVersion already exist remove and re-tag"
git tag -d $ReleaseVersion
git push origin :refs/tags/$ReleaseVersion
echo ""
git tag -a $ReleaseVersion -m "new release $ReleaseVersion"
git push origin $ReleaseVersion
echo ""
fi
fi
echo "Done"