Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges committed Jan 3, 2022
1 parent c24eb14 commit 4e22620
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,20 @@ monitor:

.PHONY: release
release:
exit 0
@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 diff --quiet || { echo "Git working directory is dirty."; exit 1 ; }

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

git merge --ff-only v$(version) mapic-release-test
@echo -n "Release mist-api-connector? [y] "
@read ans && [ $${ans:-y} = y ] || { echo "Mapic release aborted, branch not fast-forwarded."; exit 1 ; }

git checkout mapic-release-test
git merge --ff-only v$(version)
git push origin mapic-release-test

0 comments on commit 4e22620

Please sign in to comment.