Skip to content

Commit

Permalink
Upload pull request builds to transfer.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants committed Nov 27, 2019
1 parent 7c97e36 commit 2d693e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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; 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')
Expand Down
11 changes: 11 additions & 0 deletions scripts/upload-pull-request.sh
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 2d693e3

Please sign in to comment.