pull/10/head v0.243
Hunter Long 2018-06-25 18:51:55 -07:00
parent e9cc035079
commit c14e092e79
3 changed files with 35 additions and 23 deletions

View File

@ -18,7 +18,7 @@ services:
env:
global:
- VERSION=0.242
- VERSION=0.243
- DB_HOST=localhost
- DB_USER=travis
- DB_PASS=
@ -69,4 +69,7 @@ script:
- go test -v
after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c ./build.sh; fi
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c .travis/build.sh; fi
after_deploy:
- /bin/bash -c .travis/deploy.sh

View File

@ -43,24 +43,4 @@ mv $APP-linux-arm-7 $APP
tar -czvf $APP-linux-arm7.tar.gz $APP && rm -f $APP
mv $APP-linux-arm64 $APP
tar -czvf $APP-linux-arm64.tar.gz $APP && rm -f $APP
body='{
"request": {
"branch":"master",
"config": {
"merge_mode": "merge",
"env": {
"VERSION": "'"$VERSION"'"
}
}
}
}'
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_API" \
-d "$body" \
https://api.travis-ci.com/repo/hunterlong%2Fhomebrew-statup/requests
tar -czvf $APP-linux-arm64.tar.gz $APP && rm -f $APP

29
.travis/deploy.sh Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# update homebrew to newest version by building on travis
body='{
"request": {
"branch":"master",
"config": {
"merge_mode": "merge",
"env": {
"VERSION": "'"$VERSION"'"
}
}
}
}'
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_API" \
-d "$body" \
https://api.travis-ci.com/repo/hunterlong%2Fhomebrew-statup/requests
if [ "$TRAVIS_BRANCH" == "master" ]
then
curl -X POST $DOCKER > /dev/null
else
curl -H "Content-Type: application/json" --data '{"source_type": "Tag", "source_name": "v'"$VERSION"'"}' -X POST $DOCKER > /dev/null
fi