-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b09d21
commit f00aaef
Showing
3 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Documentation for how to configure goreleaser can be found at http://goreleaser.com | ||
project_name: kyma | ||
release: | ||
github: | ||
owner: kyma-project | ||
name: runtime-watcher | ||
prerelease: auto | ||
before: | ||
hooks: | ||
- make resolve | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
main: ./runtime-watcher/ | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
archives: | ||
- id: foo | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
use: github | ||
sort: asc | ||
groups: | ||
- title: Bug fixes | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 1 | ||
- title: Dependencies | ||
regexp: '^.*?deps(\([[:word:]]+\))??!?:.+$' | ||
order: 2 | ||
- title: Documentation | ||
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$' | ||
order: 3 | ||
- title: Test suites | ||
regexp: '^.*?test(\([[:word:]]+\))??!?:.+$' | ||
order: 4 | ||
- title: Features | ||
order: 0 | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
- '^(B|b)ump' | ||
- '^.*?chore(\([[:word:]]+\))??!?:.+$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# standard bash error handling | ||
set -o nounset # treat unset variables as an error and exit immediately. | ||
set -o errexit # exit immediately when a command fails. | ||
set -E # needs to be set if we want the ERR trap | ||
|
||
get_new_release_version() { | ||
# get the list of tags in a reverse chronological order | ||
TAG_LIST=($(git tag --sort=-creatordate)) | ||
export GORELEASER_CURRENT_TAG=${TAG_LIST[0]} | ||
} | ||
|
||
get_previous_release_version() { | ||
# get the list of tags in a reverse chronological order excluding release candidate tags | ||
TAG_LIST_WITHOUT_RC=($(git tag --sort=-creatordate | grep -v -e "-rc")) | ||
if [[ $GORELEASER_CURRENT_TAG == *"-rc"* ]]; then | ||
export GORELEASER_PREVIOUS_TAG=${TAG_LIST_WITHOUT_RC[0]} | ||
else | ||
export GORELEASER_PREVIOUS_TAG=${TAG_LIST_WITHOUT_RC[1]} | ||
fi | ||
} | ||
|
||
main() { | ||
git remote add origin [email protected]:kyma-project/runtime-watcher.git | ||
get_new_release_version | ||
get_previous_release_version | ||
# release watcher with release notes generated by goreleaser | ||
curl -sL https://git.io/goreleaser | VERSION=v0.0.1-test1 bash -s -- | ||
} | ||
|
||
main |