question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API for Moving to Final Releases

See original GitHub issue

(Disclaimer: this is certainly something that could be “self-rolled” from what is already exposed by python-semver, but it seems like a useful API to provide) To my knowledge, there is a gap in the bump_* family of functions. Consider the version v = 1.2.3-rc.4+build.5:

bump_major(v)      -> 2.0.0
bump_minor(v)      -> 1.3.0
bump_patch(v)      -> 1.2.4
bump_prerelease(v) -> 1.2.3-rc.5
bump_build(v)      -> 1.2.3-rc.4+build.6

What I think would be useful is something along the lines of a finalize_version function, which would convert both 1.2.3 and 1.2.3-rc.4+build.5 into 1.2.3 (i.e. the corresponding final version). Alternatively, if we want to look at node-semver as inspiration, the behavior of bump_patch could be changed such that 1.2.3-rc.4 would bump to 1.2.3, while 1.2.3 would bump to 1.2.4. The intuition is that, since the spec says that these final versions are greater than the prerelease builds, it would make sense to be able to “bump” to them.

Would you agree that this is worth adding?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
k-bxcommented, Sep 23, 2017

‘finalize_version’ makes more sense to me

0reactions
k-bxcommented, Sep 23, 2017

@belph thank you! Released under 2.7.9 https://pypi.python.org/pypi/semver

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases API - GitLab Docs
Use this API to manipulate GitLab Release entries. For manipulating links as a release asset, see Release Links API.
Read more >
Get Release - REST API (Azure DevOps Release)
Specify whether the user requesting a release or deployment should allow to approver. The number of approvals required to move release forward. '0'...
Read more >
Managing releases in a repository - GitHub Docs
You can create new releases with release notes, @mentions of contributors, and links to binary files, as well as edit or delete existing...
Read more >
API upgrades | Stripe Documentation
Keep track of changes and upgrades to the Stripe API. ... If no successful payment is made, the subscription will move into a...
Read more >
Prepare and roll out a release - Play Console Help
A release is a combination of one or more app versions that you'll prepare to launch an app or roll out an app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found