Skip to content

Commit 8e4c844

Browse files
author
JAMES FUQIAN
committed
single sourcing the sdk version value - fix version inconsistency.
1 parent 9ad4257 commit 8e4c844

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

README-sdk-dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ Before building and publishing a new version, the version number needs to be inc
309309

310310
NOTE: Once a file is uploaded, it can not be replaced with a new file. A new version is needed per: https://test.pypi.org/help/#file-name-reuse
311311

312-
To do this, edit the following line in the `setup.py` file with the desired release version:
312+
To do this, edit the following line in the `./cms_bluebutton/version.py` file with the desired release version, e.g. the SDK version to be released is 1.0.0:
313313

314314
```
315-
version="1.0.0",
315+
__version__ = "1.0.0",
316316
```
317317

cms_bluebutton/constants.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
SDK_VERSION = "1.0.0"
1+
from .version import __version__ as sdk_version
2+
23

34
SDK_HEADERS = {
45
"X-BLUEBUTTON-SDK": "python",
5-
"X-BLUEBUTTON-SDK-VERSION": SDK_VERSION
6+
"X-BLUEBUTTON-SDK-VERSION": sdk_version
67
}
78

89
REFRESH_TOKEN_ENDPOINT = "/o/token/"

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import setuptools
22

33

4+
version = {}
5+
with open("./cms_bluebutton/version.py") as fp:
6+
exec(fp.read(), version)
7+
48
with open("README.md", "r", encoding="utf-8") as fh:
59
long_description = fh.read()
610

711
setuptools.setup(
812
name="cms-bluebutton-sdk",
9-
version="1.0.1",
13+
version=version['__version__'],
1014
author="CMS Blue Button 2.0 Team",
1115
author_email="BlueButtonAPI@cms.hhs.gov",
1216
license="CC0 1.0 Universal",

0 commit comments

Comments
 (0)