diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f9322fd1664aa6f32a3259456bb19a2e285859f3 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: release + +release: + # Grep the version from pyproject.toml, squeeze multiple spaces, delete double and single quotes, get 3rd val. + # This command tolerates multiple whitespace sequences around the version number. + $(eval version:=$(shell grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)) + echo Releasing version $(version) + git commit pyproject.toml -m "Version $(version)" + git tag $(version) + git push origin master $(version)