您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

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