Skip to content
Snippets Groups Projects
Commit fc02451d authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

automatically using package version at runtime

parent 503ccc29
No related branches found
No related tags found
No related merge requests found
......@@ -22,17 +22,6 @@ examples:
script:
- python tests.py -v
verify_tag:
stage: test
before_script:
- *pip_install_default
script:
- CHECKED_VERSION=`python -c "import ess;print(ess.__version__)"`
- echo "${CHECKED_VERSION} - ${CI_COMMIT_TAG}"
- if [ "${CI_COMMIT_TAG}" == "${CHECKED_VERSION}" ];then exit 0;else exit 1;fi
only:
- tags
pages:
stage: deploy
script:
......
......@@ -3,6 +3,7 @@ from . import installed
from . import lib_tw
from . import fieldmap
from .nextcloud import nextcloud
from pkg_resources import get_distribution, DistributionNotFound
__all__ = [
"fieldmap",
......@@ -13,4 +14,11 @@ __all__ = [
"ttf.py",
"nextcloud",
]
__version__ = "2.10.4"
__name__ = "ess-python-tools"
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment