Skip to content

Commit 620a95f

Browse files
authored
CM-15776 - handle version managing better (#26)
* update version * cyclient holds the version * ok it works * added VERSION file
1 parent c086199 commit 620a95f

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.6

cli/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
from version import version
1+
from pathlib import Path
22

3-
__version__ = version
3+
4+
def get_version():
5+
this_directory = Path(__file__).parent
6+
root_project_directory = Path(this_directory).parent
7+
return (root_project_directory / "VERSION.txt").read_text(encoding='utf-8')
8+
9+
10+
__version__ = get_version()
411

cyclient/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
"""Cycode Client"""
1+
from pathlib import Path
22
from .config import logger
3-
from version import version
43

5-
__version__ = version
4+
5+
def get_version():
6+
this_directory = Path(__file__).parent
7+
root_project_directory = Path(this_directory).parent
8+
return (root_project_directory / "VERSION.txt").read_text(encoding='utf-8')
9+
10+
11+
__version__ = get_version()
612

713
__all__ = [
814
"logger",

version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)