forked from Metastruct/garrysmod-chatsounds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
28 lines (23 loc) · 1.62 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
language: generic
dist: bionic
services:
- docker
before_install:
- docker pull potcfdk/chatsounds-preprocessor:latest
# remove the invalid soundfile list (if any) and fail if the cache file exists (which it shouldn't)
- rm -f invalid-soundfiles.txt
- if [ -f chatsounds-preprocessor-cache ]; then >&2 echo -e "Precondition failed\x3A Preprocessor cache file exists in the repo."; false; fi
#before_script: docker run -t --rm potcfdk/chatsounds-preprocessor --version
script: docker run -t --rm -v "$TRAVIS_BUILD_DIR:/chatsounds" --user $(id -u):$(id -g) potcfdk/chatsounds-preprocessor --full --non-interactive
after_success:
- openssl aes-256-cbc -K $encrypted_1794e5363862_key -iv $encrypted_1794e5363862_iv -in .deploy_key.enc -out .deploy_key -d
&& eval "$(ssh-agent -s)" && chmod 600 .deploy_key && ssh-add .deploy_key
- git config user.name "Meta Automator" && git config user.email [email protected]
- git remote remove origin && git remote add origin [email protected]:Metastruct/garrysmod-chatsounds.git && git fetch --unshallow
- if [ "$(git rev-parse origin/master)" == "$TRAVIS_COMMIT" ]; then
git checkout master && git add lua && git commit -m "chatsounds preprocessor ($TRAVIS_COMMIT)" -m "[ci skip]";
git push --set-upstream origin master;
else
echo "The commit this build was started for is not the one on master. Not pushing to master.";
fi
after_failure: if [ -f invalid-soundfiles.txt ]; then >&2 echo "Invalid sound files list:" | cat - invalid-soundfiles.txt; fi