Skip to content

Commit

Permalink
ops(release): add Makefile targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jannismain committed Sep 19, 2023
1 parent 628d8fc commit fd90f8b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ build
docs/examples
src/init_python_project/template
src/init_python_project/copier.yaml
.env
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test-all: ## run all tests
pytest ${PYTEST_ARGS}


.PHONY: build install-build
.PHONY: build install-build copy-template build-clean
PKGNAME=init_python_project
PKGDIR=src/${PKGNAME}
BUILDDIR?=build/dist
Expand All @@ -125,6 +125,21 @@ copy-template:
build-clean: ## remove build artifacts
rm -rf ${BUILDDIR} ${PKGDIR}/template ${PKGDIR}/copier.yaml

.PHONY: release release-test release-tag release-pypi release-github
release: release-test release-tag build release-pypi release-github
release-test:
@nox
release-tag:
@git tag -m 'bump version to '`init-python-project --version` `init-python-project --version` --sign
release-pypi:
twine upload ${BUILDDIR}/*
release-github:
@git push --tags
gh release create `init-python-project --version` \
--title `init-python-project --version` \
--notes '*[see changes](https://github.com/jannismain/python-project-template/blob/main/CHANGELOG.md#'`init-python-project --version | tr -d .`'---'`date -Idate`')*'
gh release upload `init-python-project --version` ${BUILDDIR}/*.tar.gz ${BUILDDIR}/*.whl


.PHONY: help
# a nice way to document Makefiles, found here: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
Expand Down

0 comments on commit fd90f8b

Please sign in to comment.