Skip to content

Commit 7b7498b

Browse files
committed
add __version__ attribute to get installed knesset-data version from code
1 parent 6ae3e1f commit 7b7498b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.travis/after_success.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -e # exit on errors
77
if [ "${TRAVIS_TAG}" != "" ] && [ "${TRAVIS_REPO_SLUG}" == "hasadna/knesset-data-python" ] && [ "${TRAVIS_PYPI_USER}" != "" ] && [ "${TRAVIS_PYPI_PASS}" != "" ]; then
88
echo "publishing tagged release to pypi"
99
echo "${TRAVIS_TAG}" > VERSION.txt
10+
echo "__version__ = '${TRAVIS_TAG}'" >> knesset_data/__init__.py
1011
rm -rf dist build
1112
pip install twine
1213
./setup.py bdist_wheel

knesset_data/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Knesset Data API
22
33
Provides classes that allow fetching data about the Knesset.
4-
"""
4+
"""
5+
6+

0 commit comments

Comments
 (0)