mirror of https://github.com/statping/statping
version control and snapcraft
parent
24b2f4303c
commit
6d9ff05e59
12
Makefile
12
Makefile
|
@ -11,7 +11,7 @@ BUILDVERSION=-ldflags "-X main.VERSION=${VERSION} -X main.COMMIT=$(TRAVIS_COMMIT
|
|||
RICE=$(GOPATH)/bin/rice
|
||||
PATH:=/usr/local/bin:$(GOPATH)/bin:$(PATH)
|
||||
PUBLISH_BODY='{ "request": { "branch": "master", "config": { "env": { "VERSION": "${VERSION}", "COMMIT": "$(TRAVIS_COMMIT)" } } } }'
|
||||
TRAVIS_BUILD_CMD='{ "request": { "branch": "master", "message": "Compile master for Statup v${VERSION}", "config": { "os": [ "linux" ], "language": "go", "go": [ "1.10.x" ], "go_import_path": "github.com/hunterlong/statup", "install": true, "sudo": "required", "services": [ "docker" ], "env": { "VERSION": "${VERSION}" }, "matrix": { "allow_failures": [ { "go": "master" } ], "fast_finish": true }, "before_deploy": [ "git config --local user.name \"hunterlong\"", "git config --local user.email \"info@socialeck.com\"", "make tag" ], "deploy": [ { "provider": "releases", "api_key": "$(GH_TOKEN)", "file": [ "build/statup-osx-x64.tar.gz", "build/statup-osx-x32.tar.gz", "build/statup-linux-x64.tar.gz", "build/statup-linux-x32.tar.gz", "build/statup-linux-arm64.tar.gz", "build/statup-linux-arm7.tar.gz", "build/statup-linux-alpine.tar.gz", "build/statup-windows-x64.zip" ], "skip_cleanup": true } ], "notifications": { "email": false }, "before_script": ["gem install sass"], "script": [ "travis_wait 30 docker pull karalabe/xgo-latest", "make release" ], "after_success": [], "after_deploy": [ "make publish-dev" ] } } }'
|
||||
TRAVIS_BUILD_CMD='{ "request": { "branch": "master", "message": "Compile master for Statup v${VERSION}", "config": { "os": [ "linux" ], "language": "go", "go": [ "1.10.x" ], "go_import_path": "github.com/hunterlong/statup", "install": true, "sudo": "required", "services": [ "docker" ], "env": { "VERSION": "${VERSION}" }, "matrix": { "allow_failures": [ { "go": "master" } ], "fast_finish": true }, "before_deploy": [ "git config --local user.name \"hunterlong\"", "git config --local user.email \"info@socialeck.com\"", "make tag" ], "deploy": [ { "provider": "releases", "api_key": "$(GH_TOKEN)", "file": [ "build/statup-osx-x64.tar.gz", "build/statup-osx-x32.tar.gz", "build/statup-linux-x64.tar.gz", "build/statup-linux-x32.tar.gz", "build/statup-linux-arm64.tar.gz", "build/statup-linux-arm7.tar.gz", "build/statup-linux-arm6.tar.gz", "build/statup-linux-alpine.tar.gz", "build/statup-windows-x64.zip" ], "skip_cleanup": true } ], "notifications": { "email": false }, "before_script": ["gem install sass"], "script": [ "travis_wait 30 docker pull karalabe/xgo-latest", "make release" ], "after_success": [], "after_deploy": [ "make publish-dev", "make snapcraft" ] } } }'
|
||||
TEST_DIR=$(GOPATH)/src/github.com/hunterlong/statup
|
||||
PATH:=$(PATH)
|
||||
|
||||
|
@ -113,15 +113,11 @@ docs:
|
|||
# build Statup for Mac, 64 and 32 bit
|
||||
build-mac: compile
|
||||
mkdir build
|
||||
$(XGO) $(BUILDVERSION) --targets=darwin/amd64 ./cmd
|
||||
$(XGO) $(BUILDVERSION) --targets=darwin/386 ./cmd
|
||||
$(XGO) $(BUILDVERSION) --targets=darwin/amd64,darwin/386 ./cmd
|
||||
|
||||
# build Statup for Linux 64, 32 bit, arm6/arm7
|
||||
build-linux: compile
|
||||
$(XGO) $(BUILDVERSION) --targets=linux/amd64 ./cmd
|
||||
$(XGO) $(BUILDVERSION) --targets=linux/386 ./cmd
|
||||
$(XGO) $(BUILDVERSION) --targets=linux/arm-7 ./cmd
|
||||
$(XGO) $(BUILDVERSION) --targets=linux/arm64 ./cmd
|
||||
$(XGO) $(BUILDVERSION) --targets=linux/amd64,linux/386,linux/arm-7,linux/arm-6,linux/arm64 ./cmd
|
||||
|
||||
# build for windows 64 bit only
|
||||
build-windows: compile
|
||||
|
@ -260,6 +256,8 @@ compress:
|
|||
cd build && zip $(BINARY_NAME)-windows-x64.zip $(BINARY_NAME).exe && rm -f $(BINARY_NAME).exe
|
||||
cd build && mv cmd-linux-arm-7 $(BINARY_NAME)
|
||||
cd build && tar -czvf $(BINARY_NAME)-linux-arm7.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
|
||||
cd build && mv cmd-linux-arm-6 $(BINARY_NAME)
|
||||
cd build && tar -czvf $(BINARY_NAME)-linux-arm6.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
|
||||
cd build && mv cmd-linux-arm64 $(BINARY_NAME)
|
||||
cd build && tar -czvf $(BINARY_NAME)-linux-arm64.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
|
||||
|
||||
|
|
Loading…
Reference in New Issue