diff --git a/.gitignore b/.gitignore index 47ed842..374557b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ *~ .*.sw[a-z] -vendor/github.com/ -vendor/golang.org/ -vendor/gopkg.in/ +/vendor/github.com/ +/vendor/golang.org/ +/vendor/gopkg.in/ +/pachelbel +/pachelbel.exe +/pachelbel*.tgz +/pachelbel*.zip diff --git a/.travis.yml b/.travis.yml index 95d4f4e..29027a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ +sudo: false language: go - -go: -- 1.8 +go: 1.8 +notifications: + email: + on_success: never + on_failure: never before_deploy: - mv $GOPATH/bin/pachelbel ${TRAVIS_BUILD_DIR} @@ -12,6 +15,7 @@ before_deploy: - zip ${TRAVIS_BUILD_DIR}/pachelbel_windows_amd64.zip ./pachelbel.exe deploy: + skip_cleanup: true provider: releases file: - ${TRAVIS_BUILD_DIR}/pachelbel_linux_amd64.tgz @@ -21,3 +25,4 @@ deploy: secure: UdI8QXj4ftVKoE2poKVC3NKr2xGgVHdC5+/o5I3C7VXKibI98Go/t6TfWkkOBH8fzYjj5hSZ+npjeopZCJUrSezRL1mtC7gyF5h+ExvcgkJjJNv/VhFQpopddJUifHiDXk/oGSV/cXsZR0N0IGfX0QB2/Y6DiLY5bAuZ6hSMHgOr8jsFKPKZoMYOFImdLr9Ducln1aPgNQO/HlGVrGwDsCUBazD4onUm7fMBNXcBUvnSLVas3izTda+NYYlX2aQncSrqvuQFi7sK+ny4RwX2tCW2m2/5WVk5oHTmhzr9B4FIfYi5pyzPKywvUNwJgkepLCbhkZVx3Uh7nN/rZCiRhBPa3qiVXihexi0ydbwnJm+d5vjbFreK2fzjGHEDT2jEUfgVzQiV6XE8Cch5yVT+gfg43E+nUF70Uja063ti8/9GvA27h0c1dg+bu5tz8p/lB8YIv3f0NeYG3odAzTH/mfSgV5S8l5ztGqMw2G192ZdvAPnSI0GMutoa4d1tdzrTTi8n9iY9sCJdrMTtuGK2hzUBRNUlFjw5+mT+WQIGdUdgi/A2Q4NmY+I7NEyeWwPdqB1MHhjqdIXjqWY+HWxparCaUgdg2rkA4z+VvVDVnCc2lqKYeiV9x1cvdFpAFiyGg1Yg6KluZoialh/xwNq761JsTZGcNWCpRrFkYjbs8PA= on: tags: true + repo: benjdewan/pachelbel diff --git a/Makefile b/Makefile index 9558918..ac1365d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CC=gcc +LDFLAGS="-X /cmd.version=$(shell git describe --tags || echo DEV-BUILD)" .PHONY: all clean @@ -18,13 +18,13 @@ endif post-build: linux-build macos-build windows-build linux-build: test-build - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install github.com/benjdewan/pachelbel + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -ldflags $(LDFLAGS) github.com/benjdewan/pachelbel macos-build: test-build - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go install github.com/benjdewan/pachelbel + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go install -ldflags $(LDFLAGS) github.com/benjdewan/pachelbel windows-build: test-build - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go install github.com/benjdewan/pachelbel + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go install -ldflags $(LDFLAGS) github.com/benjdewan/pachelbel test-build: pre-build $(GOPATH)/bin/gometalinter cmd/ connection/ main.go diff --git a/cmd/version.go b/cmd/version.go index 2644ee6..8ff3c5f 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -26,7 +26,7 @@ import ( "github.com/spf13/cobra" ) -const version string = "v0.1.2" +var version string = "DEV-BUILD" var versionCmd = &cobra.Command{ Use: "version",