X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/blobdiff_plain/aed41c20d448af918f2fa33d99e8fefbe0033529..f19fbc14e48c967e377e9557e85806336c3b0363:/Makefile diff --git a/Makefile b/Makefile index f17d128..d2bba49 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ -LIBRARY_VERSION=`cat library/setup.py | grep version | awk -F"'" '{print $$2}'` -LIBRARY_NAME=`cat library/setup.py | grep name | awk -F"'" '{print $$2}'` +LIBRARY_VERSION=$(shell grep version library/setup.cfg | awk -F" = " '{print $$2}') +LIBRARY_NAME=$(shell grep name library/setup.cfg | awk -F" = " '{print $$2}') .PHONY: usage install uninstall usage: + @echo "Library: ${LIBRARY_NAME}" + @echo "Version: ${LIBRARY_VERSION}\n" @echo "Usage: make , where target is one of:\n" @echo "install: install the library locally from source" @echo "uninstall: uninstall the local library" @@ -13,6 +15,7 @@ usage: @echo "python-clean: clean python build and dist directories" @echo "python-dist: build all python distribution files" @echo "python-testdeploy: build all and deploy to test PyPi" + @echo "tag: tag the repository with the current version" install: ./install.sh @@ -22,20 +25,25 @@ uninstall: check: @echo "Checking for trailing whitespace" - @! grep -IUrn --color "[[:blank:]]$$" --exclude-dir=.tox --exclude-dir=.git --exclude=PKG-INFO + @! grep -IUrn --color "[[:blank:]]$$" --exclude-dir=sphinx --exclude-dir=.tox --exclude-dir=.git --exclude=PKG-INFO @echo "Checking for DOS line-endings" - @! grep -IUrn --color " " --exclude-dir=fonts --exclude-dir=.tox --exclude-dir=.git --exclude=Makefile + @! grep -IUrn --color " " --exclude-dir=sphinx --exclude-dir=.tox --exclude-dir=.git --exclude=Makefile @echo "Checking library/CHANGELOG.txt" @cat library/CHANGELOG.txt | grep ^${LIBRARY_VERSION} @echo "Checking library/${LIBRARY_NAME}/__init__.py" @cat library/${LIBRARY_NAME}/__init__.py | grep "^__version__ = '${LIBRARY_VERSION}'" +tag: + git tag -a "v${LIBRARY_VERSION}" -m "Version ${LIBRARY_VERSION}" + python-readme: library/README.rst python-license: library/LICENSE.txt -library/README.rst: README.md +library/README.rst: README.md library/CHANGELOG.txt pandoc --from=markdown --to=rst -o library/README.rst README.md + echo "" >> library/README.rst + cat library/CHANGELOG.txt >> library/README.rst library/LICENSE.txt: LICENSE cp LICENSE library/LICENSE.txt