diff --git a/.gitignore b/.gitignore index 99f7832..21a0554 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.o *.a *.so - +cli # Folders _obj _test diff --git a/.travis.yml b/.travis.yml index 64bc5d6..072a8da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,28 @@ language: go -go: - - "1.12.x" - - "1.11.x" +matrix: + allow_failures: + - go: master + include: + - go: 1.11.x + - go: 1.12.x + - go: master env: - - GO111MODULE=on \ No newline at end of file + global: + - GO111MODULE=on +after_success: +- make build-cli +deploy: +- provider: releases + api_key: + secure: AUbu2A4D6a7gzbmnJMcOILLMTcRLvC0MyEPQFJw1apRXAMRi4hWDYfmR9L3CdftvyMPyKzhRsCeXk3AuvcjsVN4IPglb/3Uy4Ot52vHfRbMNY6H+dMU/rBq+VFFzFaTzvIYCR9ai9EwhiORVpO1QMip+aATQE2sEQJOVC/uf373wrn+u6TVOiTvskTlR8aCRCW/MibdYzZXiuCdKoPgCqUxAXYStIuc62PX9Y8EP2GZ5N6nCNAlVY64XjStQyi5d19nJzQuvG0x6/JQe99Z39H6yEDWkBMaCPPtP0yPZcwGQ5BxummKLtZP7QM83wSuS3954IhHDFabZc7It36uBu7KuBZZsURAVCnKU54WB0MO17naWxuTClqMxHBes3j9iVGw8BWaNzVORqb+JQ09cytn+BcaoOqvvfovDzmYmqBxT+dy1ZgtLp2cgk+be5mjPC1FvrtIKhqDE+fKqhw+Ogmq7L2F7Oe4WZqGj0iFGbSBODxaRW9T1OylrlUol76Qjd0ylbOQ4i/x3luu5LiRICNXw61IvgTEtmCjt1e3K6flbrGDk7XTCMKKvVekJQsm+oYzSnTVi/p8rT1ZXPfR3X0qtKkbU3T8o3dH/AqfqnUBaE7O5tqNvq+eTqUuoLoRogUpjjLa9IL4a4m+Gn6ZsxdyAPNycFesyIEZd1cupoTg= + skip_cleanup: true + draft: true + on: + go: 1.12.x + repo: dmarkham/enumer + tags: true + file: + - cli/build/enumer.linux-amd64.tar.gz + - cli/build/enumer.darwin-amd64.tar.gz + - cli/build/enumer.windows-amd64.exe.tar.gz + - cli/build/sha256sum.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ebd5628 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ + +build-cli: clean + -mkdir -p ./cli/build + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o ./cli/build/enumer.linux-amd64 . + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -o ./cli/build/enumer.darwin-amd64 . + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -o ./cli/build/enumer.windows-amd64.exe . + cd ./cli/build && find . -name 'enumer*' | xargs -I{} tar czf {}.tar.gz {} + cd ./cli/build && shasum -a 256 * > sha256sum.txt + cat ./cli/build/sha256sum.txt + + +# example: make release V=0.0.0 +release: + git tag v$(V) + @read -p "Press enter to confirm and push to origin ..." && git push origin v$(V) + + +clean: + -rm -r ./cli/build