You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.3 KiB

123456789101112131415161718192021222324252627282930313233343536
  1. env:
  2. @if [[ "$$RELEASE_NUMBER" == "" ]]; \
  3. then echo "Missing environment variable: RELEASE_NUMBER."; \
  4. echo 'Example: export RELEASE_NUMBER="1.0.0" (without the leading "v")'; \
  5. exit 1; \
  6. fi
  7. release: env
  8. @echo -e "\e[1mCreating release with version number \e[36m$$RELEASE_NUMBER\e[0m"
  9. @echo
  10. sed "s/^VERSION =.*/VERSION = '$$RELEASE_NUMBER'/g" kosmorrolib/version.py > version.py
  11. mv version.py kosmorrolib/version.py
  12. pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot > /dev/null
  13. conventional-changelog -p angular -i CHANGELOG.md -s
  14. sed "0,/\\[\\]/s/\\[\\]/[v$$RELEASE_NUMBER]/g" CHANGELOG.md > /tmp/CHANGELOG.md
  15. sed -e "s/...v)/...v$$RELEASE_NUMBER)/" /tmp/CHANGELOG.md > CHANGELOG.md
  16. rm /tmp/CHANGELOG.md
  17. @echo
  18. @echo -e "\e[1mRelease \e[36m$$RELEASE_NUMBER\e[39m is ready to commit."
  19. @echo -e "Please review the changes, then invoke \e[33mmake finish-release\e[39m."
  20. finish-release: env
  21. git add CHANGELOG.md kosmorrolib/version.py kosmorrolib/locales/messages.pot
  22. git commit -m "build: bump version $$RELEASE_NUMBER"
  23. git tag "v$$RELEASE_NUMBER"
  24. git checkout features
  25. git merge master
  26. git checkout master
  27. @echo
  28. @echo -e "\e[1mVersion \e[36m$$RELEASE_NUMBER\e[39m successfully tagged!"
  29. @echo -e "Invoke \e[33mgit push origin master features v$$RELEASE_NUMBER\e[39m to finish."