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 Oct 28, 2019
1 parent d0730c7 commit 0f9067c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ script:
#- make lint
#- make vet
- go test
before_deploy:
after_success:
- docker pull stashappdev/compiler
- sh ./scripts/cross-compile.sh
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then sh ./scripts/upload-pull-request.sh; fi'
before_deploy:
- git tag -f v0.0.0-alpha
- git push -f --tags
- export RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')
Expand All @@ -40,4 +42,4 @@ deploy:
branches:
only:
- master
- develop
- develop
14 changes: 14 additions & 0 deletions scripts/upload-pull-request.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# assumes cross-compile.sh has already been run successfully
uploadFile()
{
FILE=$1
BASENAME="$(basename "${FILE}")"
uploadedTo=`curl --upload-file $FILE "https://transfer.sh/$BASENAME"`
echo "$BASENAME uploaded to url: $uploadedTo"
}

uploadFile "dist/stash-osx"
uploadFile "dist/stash-win.exe"
uploadFile "dist/stash-linux"

0 comments on commit 0f9067c

Please sign in to comment.