mirror of https://github.com/statping/statping
parent
e9cc035079
commit
c14e092e79
|
@ -18,7 +18,7 @@ services:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- VERSION=0.242
|
- VERSION=0.243
|
||||||
- DB_HOST=localhost
|
- DB_HOST=localhost
|
||||||
- DB_USER=travis
|
- DB_USER=travis
|
||||||
- DB_PASS=
|
- DB_PASS=
|
||||||
|
@ -69,4 +69,7 @@ script:
|
||||||
- go test -v
|
- go test -v
|
||||||
|
|
||||||
after_success:
|
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
|
|
@ -44,23 +44,3 @@ tar -czvf $APP-linux-arm7.tar.gz $APP && rm -f $APP
|
||||||
|
|
||||||
mv $APP-linux-arm64 $APP
|
mv $APP-linux-arm64 $APP
|
||||||
tar -czvf $APP-linux-arm64.tar.gz $APP && rm -f $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
|
|
|
@ -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
|
Loading…
Reference in New Issue