mirror of https://github.com/statping/statping
travis builds
parent
c20cde567e
commit
cdbdcc1dbf
|
@ -1,32 +1,37 @@
|
|||
#!/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
|
||||
#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
|
||||
|
||||
|
||||
git clone https://$GH_USER:$GH_TOKEN@github.com/hunterlong/homebrew-statup.git
|
||||
cd homebrew-statup
|
||||
|
||||
./build.sh
|
||||
cd ../
|
||||
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS $DOCKER_URL
|
||||
docker build -t $DOCKER_URL/hunterlong/statup .
|
||||
docker push $DOCKER_URL/hunterlong/statup
|
||||
|
||||
#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
|
||||
if [ "$TRAVIS_BRANCH" != "master" ]
|
||||
then
|
||||
curl -X POST $DOCKER > /dev/null
|
||||
fi
|
|
@ -110,7 +110,7 @@ func (s *Service) SmallText() string {
|
|||
hits, _ := s.LimitedHits()
|
||||
if !s.Online {
|
||||
if len(last) > 0 {
|
||||
return fmt.Sprintf("%v at %v", last[0].ParseError(), last[0].CreatedAt.Format("Monday 3:04PM, Jan _2 2006"))
|
||||
return fmt.Sprintf("%v on %v", last[0].ParseError(), last[0].CreatedAt.Format("Monday 3:04PM, Jan _2 2006"))
|
||||
} else {
|
||||
return fmt.Sprintf("%v is currently offline", s.Name)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue