Skip to content

Commit

Permalink
Merge pull request #852 from finos/version-python
Browse files Browse the repository at this point in the history
Update versioning script for Python
  • Loading branch information
texodus authored Dec 18, 2019
2 parents b2e4719 + 072fb0b commit 94432c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/perspective/perspective/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
])

# DO NOT EDIT THIS DIRECTLY! It is managed by bumpversion
version_info = VersionInfo(0, 4, 0, 'candidate', 6)
version_info = VersionInfo(0, 4, 0, 'rc', 6)

_specifier_ = {'alpha': 'alpha', 'beta': 'beta', 'rc': 'rc', 'final': ''}

Expand Down
5 changes: 2 additions & 3 deletions scripts/version_python.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ const parse_version = function(version) {
let optional_versions = split[split.length - 2].split("-");
patch = optional_versions[0];
release_level = optional_versions[1];
if (release_level === "rc") {
release_level = "candidate"; // 'candidate' maps into bumpversion, 'rc' does not
}
serial = split[split.length - 1];
}

Expand All @@ -54,4 +51,6 @@ console.log(`Bumping \`perspective-python\` version to ${VERSION}`);

const python_path = resolve`${__dirname}/../python/perspective`;
const version_path = resolve`${__dirname}/../python/perspective/perspective/core/_version.py`;
const bumpversion_path = resolve`${__dirname}/../python/perspective/.bumpversion.cfg`;
execute`cd ${python_path} && bumpversion --allow-dirty --new-version "${parse_version(VERSION)}" ${version_path}`;
execute`git add ${version_path} ${bumpversion_path}`;

0 comments on commit 94432c2

Please sign in to comment.