-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_integration.sh
More file actions
executable file
·58 lines (53 loc) · 1.25 KB
/
Copy pathtest_integration.sh
File metadata and controls
executable file
·58 lines (53 loc) · 1.25 KB
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
#!/bin/bash
JAR_FILE="$( grep -Po "(?<=rootProject.name = ').*(?=')" settings.gradle )"-all-"$( grep -Po "(?<=version ').*(?=')" build.gradle ).jar"
pushd .
function test_solder_pack {
set -x
rm -rf run
mkdir run
cd run
cp ../build/libs/${JAR_FILE} .
java -jar ${JAR_FILE} && exit 1
cat <<EOF > modpack.properties
#Thu Aug 17 11:05:03 CEST 2017
url=http://api.technicpack.net/modpack/litwr-after-humans-unofficial-import-bgde
autoupdate=no
build=2017.08.18
javaArgs=-server -Xmx4G -XX:+DisableExplicitGC -XX:+AggressiveOpts
EOF
java -jar ${JAR_FILE} || exit 2
test $(ls cache/ | wc -l) -lt 50 && exit 3
cd ..
rm -rf run
exit 0
}
function test_zip_pack {
set -x
rm -rf run
mkdir run
cd run
cp ../build/libs/${JAR_FILE} .
java -jar ${JAR_FILE} && echo Missing Properties test failed && exit 1
cat <<EOF > modpack.properties
#Thu Aug 17 11:05:03 CEST 2017
url=http://api.technicpack.net/modpack/minecraft-after-humans
autoupdate=no
build=latest
javaArgs=-server -Xmx4G -XX:+DisableExplicitGC -XX:+AggressiveOpts
EOF
java -jar ${JAR_FILE} || exit 2
test $(ls cache/ | wc -l) -ne 1 && exit 3
test -f cache/package.zip || exit 4
cd ..
rm -rf run
exit 0
}
case $1 in
solder)
test_solder_pack
;;
*)
test_zip_pack
;;
esac
popd