Skip to content

Commit

Permalink
added makefile and run tests before release
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverisaac committed Jan 19, 2022
1 parent 76b34b9 commit 915cfbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
- go test ./...
builds:
- env:
- CGO_ENABLED=0
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

release:
[[ $$( git rev-parse --abbrev-ref HEAD ) == "main" ]] # make sure we are on main
git push origin main
git tag $$( git tag | grep "^v" | sort --version-sort | tail -n 1 | awk -F. '{OFS="."; $$3 = $$3 + 1; print}' )
git push --tags

goreleaser:
goreleaser --snapshot --skip-publish --rm-dist

0 comments on commit 915cfbe

Please sign in to comment.