Skip to content

Commit 4a1c675

Browse files
committed
bugfix makefile libname/version, new tag command
1 parent 7fcfc15 commit 4a1c675

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
LIBRARY_VERSION=`cat library/setup.py | grep version | awk -F"'" '{print $$2}'`
2-
LIBRARY_NAME=`cat library/setup.py | grep name | awk -F"'" '{print $$2}'`
1+
LIBRARY_VERSION=$(shell cat library/setup.py | grep version | awk -F"'" '{print $$2}')
2+
LIBRARY_NAME=$(shell cat library/setup.py | grep name | awk -F"'" '{print $$2}')
33

44
.PHONY: usage install uninstall
55
usage:
6+
@echo "Library: ${LIBRARY_NAME}"
7+
@echo "Version: ${LIBRARY_VERSION}\n"
68
@echo "Usage: make <target>, where target is one of:\n"
79
@echo "install: install the library locally from source"
810
@echo "uninstall: uninstall the local library"
@@ -13,6 +15,7 @@ usage:
1315
@echo "python-clean: clean python build and dist directories"
1416
@echo "python-dist: build all python distribution files"
1517
@echo "python-testdeploy: build all and deploy to test PyPi"
18+
@echo "tag: tag the repository with the current version"
1619

1720
install:
1821
./install.sh
@@ -22,14 +25,17 @@ uninstall:
2225

2326
check:
2427
@echo "Checking for trailing whitespace"
25-
@! grep -IUrn --color "[[:blank:]]$$" --exclude-dir=.tox --exclude-dir=.git --exclude=PKG-INFO
28+
@! grep -IUrn --color "[[:blank:]]$$" --exclude-dir=sphinx --exclude-dir=.tox --exclude-dir=.git --exclude=PKG-INFO
2629
@echo "Checking for DOS line-endings"
27-
@! grep -IUrn --color "" --exclude-dir=.tox --exclude-dir=.git --exclude=Makefile
30+
@! grep -IUrn --color "" --exclude-dir=sphinx --exclude-dir=.tox --exclude-dir=.git --exclude=Makefile
2831
@echo "Checking library/CHANGELOG.txt"
2932
@cat library/CHANGELOG.txt | grep ^${LIBRARY_VERSION}
3033
@echo "Checking library/${LIBRARY_NAME}/__init__.py"
3134
@cat library/${LIBRARY_NAME}/__init__.py | grep "^__version__ = '${LIBRARY_VERSION}'"
3235

36+
tag:
37+
git tag -a "v${LIBRARY_VERSION}" -m "Version ${LIBRARY_VERSION}"
38+
3339
python-readme: library/README.rst
3440

3541
python-license: library/LICENSE.txt

0 commit comments

Comments
 (0)