Skip to content

Commit 19d013b

Browse files
committed
Modify the package version info implementation.
1 parent f3d4340 commit 19d013b

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

docs/multirunnable/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
author = 'Bryant Liu'
2424

2525
# The full version, including alpha/beta/rc tags
26-
from multirunnable import _github_tag_version__, __version__
26+
from multirunnable import __github_tag_version__, __version__
2727

28-
version = _github_tag_version__
28+
version = __github_tag_version__()
2929
release = __version__
3030

3131

docs/multirunnable/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ Welcome to MultiRunnable's documentation!
88

99
|python-versions| |release-version| |pypi-version| |license|
1010

11-
12-
:GitHub Release: |version|
13-
:PyPi Release: |release|
1411
:Date: |today|
1512

1613

multirunnable/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
PYTHON_MINOR_VERSION = int(version_info[1])
1515
PYTHON_VERSION = f"{PYTHON_MAJOR_VERSION}.{PYTHON_MINOR_VERSION}"
1616

17-
from multirunnable._version import _github_tag_version__, __version__
17+
from multirunnable._version import __github_tag_version__, __version__
1818
from multirunnable.mode import RunningMode, FeatureMode
1919
from multirunnable.tasks import QueueTask
2020
from multirunnable.executor import SimpleExecutor

multirunnable/_version.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import urllib.request
22
import json
33

4+
45
__GitHub_API = 'https://api.github.com/repos/Chisanan232/multirunnable/releases/latest'
5-
__response = urllib.request.urlopen(__GitHub_API)
6-
__data = __response.readlines()
7-
_github_tag_version__ = json.loads(__data[0].decode('ascii'))["tag_name"]
8-
__version__ = "0.15.2"
6+
7+
__version__ = "0.16.1"
8+
9+
10+
def __github_tag_version__():
11+
__response = urllib.request.urlopen(__GitHub_API)
12+
__data = __response.readlines()
13+
return json.loads(__data[0].decode('ascii'))["tag_name"]

0 commit comments

Comments
 (0)