From e4374c59881032ef644fbb2fd54a554dc4d914b1 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Tue, 31 Dec 2019 00:35:02 +0100 Subject: Automated travis deployment --- .travis-ci.sh | 33 ++++++++++++++++++++++++++++++++- .travis.yml | 10 ++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index da36c17..593b254 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -76,9 +76,40 @@ elif [[ $TASK = 'windows' ]]; then travis_fold start "make_windows" make windows; travis_fold end "make_windows" + + if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster.exe ./deployment/ + cp ./backends/*.dll ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + zip -r "./midimonster-$(git describe)-windows.zip" "./" + rm -v !("*.zip") + fi + + else # Otherwise compile as normal travis_fold start "make" make full; + +if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster ./deployment/ + cp ./backends/*.so ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + tar czf "midimonster-$(git describe)-linux64.tgz" * + rm -v !("*.tgz") + fi + travis_fold end "make" -fi +fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7db9167..3299c66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -200,3 +200,13 @@ before_install: after_script: - if [ "$TASK" = "coverity" ]; then tail -n 10000 ${TRAVIS_BUILD_DIR}/cov-int/build-log.txt; cat ${TRAVIS_BUILD_DIR}/cov-int/scm_log.txt; fi + +deploy: + provider: releases + api_key: $GITHUB_TOKEN +file: + - "./deployment/*" + skip_cleanup: true + draft: true + on: + tags: true \ No newline at end of file -- cgit v1.2.3