diff options
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,6 +1,6 @@ TEMPDIR := `mktemp -d` -build: +build: test CGO=0 go build -o bumpver install: @@ -10,3 +10,20 @@ test: golangci-lint run go test -v -coverprofile={{ TEMPDIR }}/testcover.out ./... go tool cover -func={{ TEMPDIR }}/testcover.out + +release part: build + #!/usr/bin/env bash + set -euxo pipefail + current_ver=$(git describe --abbrev=0) + new_ver=$(bumpver {{part}} <(git tag -l)) + # temp tag for release notes + git tag $new_ver + echo "v${new_ver} release" > {{ TEMPDIR }}/chglog + git-chglog $current_ver..$new_ver >> {{ TEMPDIR }}/chglog + echo "## Coverage" >> {{ TEMPDIR }}/chglog + echo "" >> {{ TEMPDIR }}/chglog + go tool cover -func={{ TEMPDIR }}/testcover.out >> {{ TEMPDIR }}/chglog + # end temp tag + git tag -d $new_ver + git tag --annotate --sign --cleanup=whitespace --file {{ TEMPDIR }}/chglog ${new_ver} + git push origin ${ver} |