Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
markusressel committed Mar 8, 2022
1 parent d846b97 commit 9afd742
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,23 @@ build:
test:
pipenv run pytest

upload:
# Upload to Gemfury
# curl -F package=@dist/`ls -t1 dist/ | grep tar.gz | head -n1` https://gems.gemfury.com/<gem fury tokena
# Upload to PyPI
python setup.py sdist upload -r pypi

git-release:
set -ex
git add ${PROJECT}/__init__.py
git commit -m "Bumped version to `cat ${PROJECT}/__init__.py | grep '__version__' | cut -d ' ' -f3 | sed s/\\\"//g`"
git tag `cat ${PROJECT}/__init__.py | grep '__version__' | cut -d ' ' -f3 | sed s/\"//g`
git push
git push --tags


_release-patch:
@echo "__version__ = \"`cat ${PROJECT}/__init__.py | awk -F '("|")' '{ print($$2)}' | awk -F. '{$$NF = $$NF + 1;} 1' | sed 's/ /./g'`\"" > ${PROJECT}/__init__.py
release-patch: _release-patch git-release build upload current-version
release-patch: test _release-patch git-release current-version

_release-minor:
@echo "__version__ = \"`cat ${PROJECT}/__init__.py | awk -F '("|")' '{ print($$2)}' | awk -F. '{$$(NF-1) = $$(NF-1) + 1;} 1' | sed 's/ /./g' | awk -F. '{$$(NF) = 0;} 1' | sed 's/ /./g' `\"" > ${PROJECT}/__init__.py
release-minor: _release-minor git-release build upload current-version
release-minor: test _release-minor git-release current-version

_release-major:
@echo "__version__ = \"`cat ${PROJECT}/__init__.py | awk -F '("|")' '{ print($$2)}' | awk -F. '{$$(NF-2) = $$(NF-2) + 1;} 1' | sed 's/ /./g' | awk -F. '{$$(NF-1) = 0;} 1' | sed 's/ /./g' | awk -F. '{$$(NF) = 0;} 1' | sed 's/ /./g' `\"" > ${PROJECT}/__init__.py
release-major: _release-major git-release build upload current-version
release-major: test _release-major git-release current-version

release: release-patch

0 comments on commit 9afd742

Please sign in to comment.