-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
31 lines (28 loc) · 1.05 KB
/
.travis.yml
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
sudo: false
services:
- docker
git:
submodules: false
depth: 200
script:
- ./update.sh
- ./build.sh
after_success:
- for i in {0..4}; do eval $(printf "echo \$id_rsa_%02d\n" $i) >> ~/.ssh/id_rsa_base64; done
- base64 --decode ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\tLogLevel ERROR\n" >> ~/.ssh/config
- git config --global user.name "Travis CI"
- git config --global user.email "<>"
- git clone --single-branch --depth 1 ${DEPLOY_HOST}:csprogs.git ~/deploy
- VERSION="$(git describe --tags --dirty=*)"
- PROG="csprogs"
- ARCHIVE="${PROG}-${VERSION}.pk3"
- PKGINFO="${PROG}-${VERSION}.txt"
- echo "https://github.com/MarioSMB/modpack" > "${PKGINFO}"
- mv ${PROG}{,-${VERSION}}.dat
- mv ${PROG}{,-${VERSION}}.lno
- zip -9 "${ARCHIVE}" ${PROG}-${VERSION}.{dat,lno} "${PKGINFO}" && mv "${ARCHIVE}" ~/deploy
- cd ~/deploy
- git config --add remote.origin.url [email protected]:MarioSMB/csprogs.git
- git add -A . && git commit -m "Update" && git push origin master