diff --git a/.gitignore b/.gitignore index 35f6f029f9..ac3a6ab0f3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ debug #Various temporary created while building/running jx. /build/ release/ +dist/ scanning/ .updatebot-repos/ .terraform/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..a80b6387c2 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,28 @@ +checksum: + # You can change the name of the checksums file. + # Default is `{{ .ProjectName }}_{{ .Version }}_checksums.txt`. + name_template: "{{ .ProjectName }}_checksums.txt" + + # Algorithm to be used. + # Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384. + # Default is sha256. + algorithm: sha256 + +changelog: + # set it to true if you wish to skip the changelog generation + skip: true + +release: + # If set to true, will not auto-publish the release. + # Default is false. + draft: false + + # If set to auto, will mark the release as not ready for production + # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 + # If set to true, will mark the release as not ready for production. + # Default is false. + prerelease: false + + # You can change the name of the GitHub release. + # Default is `{{.Tag}}` + name_template: "{{.Version}}" diff --git a/Makefile b/Makefile index 44a72793ea..be93b7cf91 100644 --- a/Makefile +++ b/Makefile @@ -284,10 +284,9 @@ release: clean build test-slow-integration linux darwin win arm ## Release the b cd ./build/arm; tar -zcvf ../../release/jx-linux-arm.tar.gz jx; \ fi - go get -u github.com/progrium/gh-release - gh-release checksums sha256 - GITHUB_ACCESS_TOKEN=$(GITHUB_ACCESS_TOKEN) gh-release create $(RELEASE_ORG_REPO) $(VERSION) master $(VERSION) - + go get -u github.com/goreleaser/goreleaser + GITHUB_TOKEN=$(GITHUB_ACCESS_TOKEN) goreleaser release --config=.goreleaser.yml --rm-dist + # Don't create a changelog for the distro @if [[ -z "${DISTRO}" ]]; then \ ./build/linux/jx step changelog --verbose --header-file docs/dev/changelog-header.md --version $(VERSION) --rev $(PULL_BASE_SHA); \ fi @@ -315,11 +314,11 @@ codecov-validate: fmt: ## Format the code $(eval FORMATTED = $(shell $(GO) fmt ./...)) @if [ "$(FORMATTED)" == "" ]; \ - then \ - echo "All Go files properly formatted"; \ - else \ - echo "Fixed formatting for: $(FORMATTED)"; \ - fi + then \ + echo "All Go files properly formatted"; \ + else \ + echo "Fixed formatting for: $(FORMATTED)"; \ + fi .PHONY: lint lint: ## Lint the code