mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
Explicitly write Version to file
This commit is contained in:
parent
53677a9df1
commit
de52081481
4 changed files with 10 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -52,3 +52,4 @@ exp/
|
||||||
_extras/
|
_extras/
|
||||||
*.sublime-*
|
*.sublime-*
|
||||||
site/
|
site/
|
||||||
|
jrnl/VERSION.txt
|
||||||
|
|
|
@ -13,6 +13,7 @@ script:
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- pip install poetry
|
- pip install poetry
|
||||||
- poetry config http-basic.pypi $PYPI_USER $PYPI_PASS
|
- poetry config http-basic.pypi $PYPI_USER $PYPI_PASS
|
||||||
|
- echo $TRAVIS_TAG > jrnl/VERSION.txt
|
||||||
- poetry version $TRAVIS_TAG
|
- poetry version $TRAVIS_TAG
|
||||||
- poetry build
|
- poetry build
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
import pkg_resources
|
import os
|
||||||
|
|
||||||
dist = pkg_resources.get_distribution('jrnl')
|
__title__ = "jrnl"
|
||||||
__title__ = dist.project_name
|
__version__ = "source"
|
||||||
__version__ = dist.version
|
|
||||||
|
|
||||||
|
version_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "VERSION.txt")
|
||||||
|
if os.path.exists(version_path):
|
||||||
|
with open(version_path) as version_file:
|
||||||
|
__version__ = version_file.read()
|
||||||
|
|
|
@ -11,6 +11,7 @@ license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
homepage = "https://jrnl.sh"
|
homepage = "https://jrnl.sh"
|
||||||
repository = "https://github.com/jrnl-org/jrnl"
|
repository = "https://github.com/jrnl-org/jrnl"
|
||||||
|
include = ["VERSION.txt"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.7"
|
python = "^3.7"
|
||||||
|
|
Loading…
Add table
Reference in a new issue