mirror of https://github.com/statping/statping
version control and snapcraft
parent
117d0e50c5
commit
24b2f4303c
|
@ -1,4 +1,8 @@
|
||||||
.idea
|
.idea
|
||||||
|
snap
|
||||||
|
prime
|
||||||
|
stage
|
||||||
|
parts
|
||||||
core/rice-box.go
|
core/rice-box.go
|
||||||
config.yml
|
config.yml
|
||||||
statup.db
|
statup.db
|
||||||
|
|
|
@ -25,6 +25,7 @@ services:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
- PATH=/snap/bin:$PATH
|
||||||
- DB_HOST=localhost
|
- DB_HOST=localhost
|
||||||
- DB_USER=travis
|
- DB_USER=travis
|
||||||
- DB_PASS=
|
- DB_PASS=
|
||||||
|
@ -39,6 +40,8 @@ before_deploy:
|
||||||
|
|
||||||
after_deploy:
|
after_deploy:
|
||||||
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make publish-homebrew; fi
|
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make publish-homebrew; fi
|
||||||
|
- snapcraft login --with "$SNAP_TOKEN"
|
||||||
|
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make snapcraft; fi
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: releases
|
- provider: releases
|
||||||
|
@ -60,10 +63,10 @@ branches:
|
||||||
before_install:
|
before_install:
|
||||||
- curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep
|
- curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep
|
||||||
- chmod +x $GOPATH/bin/dep
|
- chmod +x $GOPATH/bin/dep
|
||||||
- npm install -g sass
|
|
||||||
- npm install -g newman
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- npm install -g sass
|
||||||
|
- npm install -g newman
|
||||||
- make dev-deps
|
- make dev-deps
|
||||||
- make dep
|
- make dep
|
||||||
- make install
|
- make install
|
||||||
|
@ -79,3 +82,5 @@ script:
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make travis-build; fi
|
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make travis-build; fi
|
||||||
|
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make snapcraft; fi
|
||||||
|
- sudo snap install snapcraft --classic
|
||||||
|
|
28
Makefile
28
Makefile
|
@ -229,10 +229,12 @@ clean:
|
||||||
rm -rf source/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
rm -rf source/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||||
rm -rf types/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
rm -rf types/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||||
rm -rf utils/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
rm -rf utils/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||||
|
rm -rf {parts,prime,snap,stage}
|
||||||
rm -rf dev/test/cypress/videos
|
rm -rf dev/test/cypress/videos
|
||||||
rm -f coverage.* sass
|
rm -f coverage.* sass
|
||||||
rm -f source/rice-box.go
|
rm -f source/rice-box.go
|
||||||
rm -f *.db-journal
|
rm -f *.db-journal
|
||||||
|
rm -rf *.snap
|
||||||
find . -name "*.out" -type f -delete
|
find . -name "*.out" -type f -delete
|
||||||
find . -name "*.cpu" -type f -delete
|
find . -name "*.cpu" -type f -delete
|
||||||
find . -name "*.mem" -type f -delete
|
find . -name "*.mem" -type f -delete
|
||||||
|
@ -240,7 +242,7 @@ clean:
|
||||||
|
|
||||||
# tag version using git
|
# tag version using git
|
||||||
tag:
|
tag:
|
||||||
git tag "v${VERSION}" --force
|
git tag v${VERSION} --force
|
||||||
|
|
||||||
# compress built binaries into tar.gz and zip formats
|
# compress built binaries into tar.gz and zip formats
|
||||||
compress:
|
compress:
|
||||||
|
@ -282,10 +284,26 @@ travis-build:
|
||||||
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(TRAVIS_BUILD_CMD) https://api.travis-ci.com/repo/hunterlong%2Fstatup/requests
|
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(TRAVIS_BUILD_CMD) https://api.travis-ci.com/repo/hunterlong%2Fstatup/requests
|
||||||
curl -H "Content-Type: application/json" --data '{"docker_tag": "latest"}' -X POST $(DOCKER)
|
curl -H "Content-Type: application/json" --data '{"docker_tag": "latest"}' -X POST $(DOCKER)
|
||||||
|
|
||||||
snapcraft:
|
snapcraft: snapcraft-build snapcraft-release
|
||||||
snapcraft clean statup -s pull && snapcraft --target-arch=amd64
|
|
||||||
snapcraft clean statup -s pull && snapcraft --target-arch=arm64
|
snapcraft-build:
|
||||||
snapcraft clean statup -s pull && snapcraft --target-arch=i386
|
PWD=$(shell pwd)
|
||||||
|
cp build/$(BINARY_NAME)-linux-x64.tar.gz build/$(BINARY_NAME)-linux.tar.gz
|
||||||
|
snapcraft clean statup -s pull
|
||||||
|
docker run --rm -v ${PWD}:/build -w /build --env VERSION=${VERSION} snapcore/snapcraft bash -c "apt update && snapcraft --target-arch=amd64"
|
||||||
|
cp build/$(BINARY_NAME)-linux-x32.tar.gz build/$(BINARY_NAME)-linux.tar.gz
|
||||||
|
snapcraft clean statup -s pull
|
||||||
|
docker run --rm -v ${PWD}:/build -w /build --env VERSION=${VERSION} snapcore/snapcraft bash -c "apt update && snapcraft --target-arch=i386"
|
||||||
|
cp build/$(BINARY_NAME)-linux-arm64.tar.gz build/$(BINARY_NAME)-linux.tar.gz
|
||||||
|
snapcraft clean statup -s pull
|
||||||
|
docker run --rm -v ${PWD}:/build -w /build --env VERSION=${VERSION} snapcore/snapcraft bash -c "apt update && snapcraft --target-arch=arm64"
|
||||||
|
cp build/$(BINARY_NAME)-linux-arm7.tar.gz build/$(BINARY_NAME)-linux.tar.gz
|
||||||
|
snapcraft clean statup -s pull
|
||||||
|
docker run --rm -v ${PWD}:/build -w /build --env VERSION=${VERSION} snapcore/snapcraft bash -c "apt update && snapcraft --target-arch=armhf"
|
||||||
|
rm -f build/$(BINARY_NAME)-linux.tar.gz
|
||||||
|
|
||||||
|
snapcraft-release:
|
||||||
|
snapcraft push *.snap --release edge
|
||||||
|
|
||||||
# install xgo and pull the xgo docker image
|
# install xgo and pull the xgo docker image
|
||||||
xgo-install: clean
|
xgo-install: clean
|
||||||
|
|
|
@ -16,10 +16,12 @@ grade: stable
|
||||||
parts:
|
parts:
|
||||||
statup:
|
statup:
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: https://github.com/hunterlong/statup/releases/download/latest/statup-linux-x64.tar.gz
|
source: ./build/statup-linux.tar.gz
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
statup:
|
statup:
|
||||||
command: statup
|
command: statup
|
||||||
plugs:
|
plugs:
|
||||||
- home
|
- home
|
||||||
|
- network-bind
|
||||||
|
- network
|
|
@ -1 +1 @@
|
||||||
0.79.91
|
0.79.92
|
Loading…
Reference in New Issue