Skip to content

Commit

Permalink
Makefile: add make release
Browse files Browse the repository at this point in the history
  • Loading branch information
iameli committed Feb 2, 2022
1 parent bbf25fc commit bd25d8a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,15 @@ check_local_rabbit:
echo "> echo '127.0.0.1 rabbitmq' >> /etc/hosts"; \
exit 1; \
}

.PHONY: release
release:
@if [[ ! "$(version)" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-.+)?$$ ]]; then \
echo "Must provide semantic version as arg to make." ; \
echo "e.g. make release version=1.2.3-beta" ; \
exit 1 ; \
fi
@git diff --quiet || { echo "Git working directory is dirty."; exit 1 ; }

git tag -a v$(version) -m "Release v$(version)"
git push origin v$(version)

0 comments on commit bd25d8a

Please sign in to comment.