Skip to content

Commit

Permalink
Enable releasing using goreleaser (#107)
Browse files Browse the repository at this point in the history
* Enable releasing using goreleaser
  • Loading branch information
Suleyman Akbas committed Jun 5, 2019
1 parent 8cb06f2 commit 11ddbf3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Documentation for how to configure goreleaser can be found at http://goreleaser.com
project_name: kyma
release:
prerelease: auto
before:
hooks:
- make resolve
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
ldflags: -X github.com/kyma-project/cli/pkg/kyma/cmd.Version={{.Version}}
main: ./cmd/kyma/
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ endif

FLAGS = -ldflags '-X github.com/kyma-project/cli/pkg/kyma/cmd.Version=$(VERSION)'


.PHONY: resolve
resolve:
dep ensure -vendor-only -v
Expand Down Expand Up @@ -36,6 +35,11 @@ integration-test:
archive:
cp -r bin/* $(ARTIFACTS)

.PHONY: release
release:
export GITHUB_TOKEN="$(BOT_GITHUB_TOKEN)"
curl -sL https://git.io/goreleaser | bash

.PHONY: clean
clean:
rm -rf bin
Expand All @@ -55,6 +59,5 @@ ci-pr: resolve validate build test integration-test
ci-master: resolve validate build test integration-test

.PHONY: ci-release
ci-release: resolve validate build test integration-test archive

ci-release: resolve validate build test integration-test archive release

0 comments on commit 11ddbf3

Please sign in to comment.