-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-deploy
More file actions
34 lines (26 loc) · 776 Bytes
/
run-deploy
File metadata and controls
34 lines (26 loc) · 776 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
30
31
32
33
34
#!/usr/bin/bash
cd ../Mindustry
git apply ../.patches/disable-white-space.patch
grep 'stripWhitespaceCenter: true' -iR core/assets-raw/sprites
if [[ $? == '0' ]]; then
git reset --hard
cd ../schematic-previewer
echo "Update patch file"
exit 1;
fi
./gradlew tools:pack --no-daemon
git reset --hard
cd ../schematic-previewer
./gradlew dist --no-daemon -q
if [[ ! $? == '0' ]]; then
sleep $((5 * 60)) # wait for jitpack
./gradlew dist --no-daemon -q
if [[ ! $? == '0' ]]; then
echo "Build Failed"
exit 1
fi
fi
[[ $# -ne 0 ]] && exit 0
scp ./build/libs/previewer.jar nydus:/tmp/schematic-previewer.jar
ssh nydus cp /tmp/schematic-previewer.jar /opt/botzilla/schematic-previewer.jar
ssh nydus rm /tmp/schematic-previewer.jar