-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.sh
49 lines (39 loc) · 1006 Bytes
/
travis.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
TAG=$(git describe --tags --long | sed -E -e 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,[-_],.,g')
clean () {
rm -rf *.tar.gz;
rm -rf build;
rm -rf dist;
mkdir build;
}
compress () {
raco distribute dist build/infornography && echo 'Distributing successful';
tar -czf infornography-$PLATFORM-$TAG.tar.gz dist && echo 'Compressed';
}
test_darwin () {
racket infornography-macos.rkt && echo 'Testing successful';
}
test_linux () {
racket infornography.rkt && echo 'Testing successful';
}
build_darwin () {
test_darwin;
raco exe -o build/infornography infornography-macos.rkt && echo 'Building successful';
export PLATFORM="darwin"
}
build_linux () {
test_linux;
raco exe -o build/infornography infornography.rkt && echo 'Building successful';
export PLATFORM="linux"
}
build () {
clean;
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
echo 'Building Darwin binaries...';
build_darwin;
else
echo 'Building Linux binaries...';
build_linux;
fi
compress;
}
build;