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.
 
 
 
 

66 lines
2.0 KiB

  1. black:
  2. pipenv run black kosmorro kosmorro setup.py
  3. .PHONY: test
  4. test:
  5. export LC_ALL=C.UTF-8; \
  6. export LANG=C.UTF-8; \
  7. unset KOSMORRO_LATITUDE; \
  8. unset KOSMORRO_LONGITUDE; \
  9. unset KOSMORRO_TIMEZONE; \
  10. LANG=C pipenv run python3 -m coverage run -m unittest test
  11. .PHONY: build
  12. build: #manpages
  13. python3 setup.py sdist bdist_wheel
  14. messages:
  15. pipenv run python setup.py extract_messages --output-file=kosmorro/locales/messages.pot
  16. manpages:
  17. ronn --roff manpage/kosmorro.1.md
  18. ronn --roff manpage/kosmorro.7.md
  19. i18n:
  20. python3 setup.py compile_catalog; \
  21. env:
  22. @if [[ "$$RELEASE_NUMBER" == "" ]]; \
  23. then echo "Missing environment variable: RELEASE_NUMBER."; \
  24. echo 'Example: export RELEASE_NUMBER="1.0.0" (without the leading "v")'; \
  25. exit 1; \
  26. fi
  27. release: env
  28. @echo -e "\e[1mCreating release with version number \e[36m$$RELEASE_NUMBER\e[0m"
  29. @echo
  30. sed "s/^__version__ =.*/__version__ = \"$$RELEASE_NUMBER\"/g" kosmorro/__version__.py > version.py
  31. mv version.py kosmorro/__version__.py
  32. pipenv run python setup.py extract_messages --output-file=kosmorro/locales/messages.pot > /dev/null
  33. conventional-changelog -p angular -i CHANGELOG.md -s
  34. sed "0,/\\[\\]/s/\\[\\]/[v$$RELEASE_NUMBER]/g" CHANGELOG.md > /tmp/CHANGELOG.md
  35. sed -e "s/...v)/...v$$RELEASE_NUMBER)/" /tmp/CHANGELOG.md > CHANGELOG.md
  36. rm /tmp/CHANGELOG.md
  37. @echo
  38. @echo -e "\e[1mRelease \e[36m$$RELEASE_NUMBER\e[39m is ready to commit."
  39. @echo -e "Please review the changes, then invoke \e[33mmake finish-release\e[39m."
  40. finish-release: env
  41. git add CHANGELOG.md kosmorro/__version__.py kosmorro/locales/messages.pot
  42. git commit -m "build: bump version $$RELEASE_NUMBER"
  43. git tag "v$$RELEASE_NUMBER"
  44. git checkout features
  45. git merge master
  46. git checkout master
  47. @echo
  48. @echo -e "\e[1mVersion \e[36m$$RELEASE_NUMBER\e[39m successfully tagged!"
  49. @echo -e "Invoke \e[33mgit push origin master features v$$RELEASE_NUMBER\e[39m to finish."
  50. clean:
  51. rm -rf build dist kosmorro.egg-info manpage/kosmorro.{1,7}{,.html}