-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
24 lines (24 loc) · 1.81 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language: generic
branches:
only:
- master
before_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- GIT_TAG=`git describe --abbrev=0 --tags | awk -F'[.]' '/^v/ {print $1"."$2"."$3+1}'`
- OLD_VERSION=`git describe --abbrev=0 --tags | awk -F'[.]' '/^v/ {print $1"."$2"."$3}' | cut -c 2-`
- NEW_VERSION=`git describe --abbrev=0 --tags | awk -F'[.]' '/^v/ {print $1"."$2"."$3+1}' | cut -c 2-`
- SHA256=`shasum -a 256 kps | cut -c -64`
- git tag $GIT_TAG -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER"
deploy:
provider: releases
api_key:
secure: eGHtNhkIFp9gIDblFjlO23oefKeEGagKJjnS2ulcUcZ8z/K/49K51EG9ldT79HF14HrOT6gnGW8cQQoFSW/MHs5dMYVhHiOVOLNHZQlNK7UPMdUDa3FFO5tkMAAjWnU+B0VJY2WdD8KBgilPoqiv+N1//lyY8D69H/w4d9RdIyjlwLHXsjnvo+VWuMFXkWr8VikXAckIfHnw0tst7NSRW7Bpn1WbvlpwWEyXrRuO402y/OcAaqTKWh3WLPER+mulOQZbWZUm/L+F4reO481R2byIX5wIIc+EWln6ju2E36GfVMLznJkSWhrJapWqOQruXcp0EszKZCudrBz/BbwaOxSPWB6cDimvdKQ3L2DHsGstpB9TvBAb3LO/sBWlziBtXTAb0Dax+AfgWDWTYl4OQRFnYzrHEdrKYoKxfyzA7r/jBvcJ+djhqqX94CTuK9UCYMxIAK3oQDfBFsJOYTYmEP5xtIPbpxeiQ4roiucIW17BmaDRcvHJWfptDJfG/CbH9YDvDsMZXVWWGsoSaVg3aIQdWJ8nSDDRSxtJji9pe7UM25tlM1jfJI79UOpHwSVPg8MzeYU89qb7JB0Lh1WseC4d9BAQWGdSyrppaNbnJV2a1k9O4ZulWhmZ/rIBuPUucWVZn6NKbZaq7gfaBy0MN2bZOU5b3h9icbQSmR4VMyM=
file: kps
skip_cleanup: true
on:
condition: "$TRAVIS_TEST_RESULT == 0"
repo: rcruzper/kps
after_deploy:
- body="{\"request\":{\"version\":\"master\",\"config\":{\"env\":{\"old_version\":\"$OLD_VERSION\",\"formula\":\"kps\",\"new_version\":\"$NEW_VERSION\",\"sha256\":\"$SHA256\"}}}}"
- curl -s -X POST -H "Content-Type:application/json" -H "Accept:application/json" -H "Travis-API-Version:3" -H "Authorization:token $TRAVIS_API_TOKEN" -d "$body" https://api.travis-ci.org/repo/rcruzper%2Fhomebrew-tools/requests