Skip to content

Commit

Permalink
Updated release process to use goreleaser (jenkins-x#4130)
Browse files Browse the repository at this point in the history
Signed-off-by: Cai Cooper <caicooper82@gmail.com>
  • Loading branch information
cagiti authored and jenkins-x-bot committed Jun 19, 2019
1 parent 94bda32 commit ea7fdfc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ debug
#Various temporary created while building/running jx.
/build/
release/
dist/
scanning/
.updatebot-repos/
.terraform/
Expand Down
28 changes: 28 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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}}"
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ea7fdfc

Please sign in to comment.