Upload pull request builds to transfer.sh (#165)

* Upload pull request builds to transfer.sh
This commit is contained in:
WithoutPants 2019-11-28 05:17:32 +11:00 committed by Leopere
parent 7c97e36af8
commit 482d9ddd45
2 changed files with 16 additions and 2 deletions

View File

@ -17,11 +17,14 @@ script:
#- make lint
#- make vet
- make it
before_deploy:
- if [ "$TRAVIS_BRANCH" = "develop" ]; then export TAG_SUFFIX="_dev"; fi
after_success:
- if [ "$TRAVIS_BRANCH" = "develop" ]; then export TAG_SUFFIX="_dev"; elif [ "$TRAVIS_BRANCH" != "master" ]; then export TAG_SUFFIX="_$TRAVIS_BRANCH"; fi
- export STASH_VERSION="v0.0.0-alpha${TAG_SUFFIX}"
- docker pull stashapp/compiler:develop
- sh ./scripts/cross-compile.sh ${STASH_VERSION}
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then sh ./scripts/upload-pull-request.sh; fi'
before_deploy:
- if [ "$TRAVIS_BRANCH" = "develop" ]; then export TAG_SUFFIX="_dev"; fi
- git tag -f ${STASH_VERSION}
- git push -f --tags
- export RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')

View File

@ -0,0 +1,11 @@
#!/bin/sh
# assumes cross-compile.sh has already been run successfully
function uploadFile(file) {
BASENAME="$(basename "${FILE}")"
curl --upload-file $FILE "https://transfer.sh/$BASENAME"
}
uploadFile("dist/stash-osx")
uploadFile("dist/stash-win.exe")
uploadFile("dist/stash-linux")