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.6 KiB

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