mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Upload pull request builds to transfer.sh (#165)
* Upload pull request builds to transfer.sh
This commit is contained in:
@@ -17,11 +17,14 @@ script:
|
|||||||
#- make lint
|
#- make lint
|
||||||
#- make vet
|
#- make vet
|
||||||
- make it
|
- make it
|
||||||
before_deploy:
|
after_success:
|
||||||
- if [ "$TRAVIS_BRANCH" = "develop" ]; then export TAG_SUFFIX="_dev"; fi
|
- 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}"
|
- export STASH_VERSION="v0.0.0-alpha${TAG_SUFFIX}"
|
||||||
- docker pull stashapp/compiler:develop
|
- docker pull stashapp/compiler:develop
|
||||||
- sh ./scripts/cross-compile.sh ${STASH_VERSION}
|
- 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 tag -f ${STASH_VERSION}
|
||||||
- git push -f --tags
|
- git push -f --tags
|
||||||
- export RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')
|
- export RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')
|
||||||
|
|||||||
11
scripts/upload-pull-request.sh
Normal file
11
scripts/upload-pull-request.sh
Normal 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")
|
||||||
Reference in New Issue
Block a user