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.

Prerelease option

See original GitHub issue

Description

I would like to propose (and integrate) a prerelease option, to create releases with version numbers like 1.0.0-alpha.0, 1.0.0-rc.0, etc.

Use cases

Publishing alpha/beta/rc versions can be really helpful when working with multiple repositories or to preview (and test) new features.

Possible implementation

I would propose following implementation:

  • new cli option --prerelease=<str>, if the prerelease option is there but has no value it defaults to rc
  • the new version number is determined as follows (if called with prerelease):
    • last version was a normal one -> normal version bump and prerelease bump: 1.0.0 + feat + fix will result in 1.1.0-rc.0
    • last version was a prerelease and no commits which would bump the version were made -> prerelease bump 1.0.0 + feat + fix => 1.1.0-rc.0 + feat + fix results in 1.1.0-rc.1
    • last version was a prerelease and commits which require a bump were made -> normal version bump and prerelease bump 1.0.0 + feat + fix => 1.1.0-rc.0 + BREAKING CHANGES + results in 2.0.0-rc.0

As this determination needs information about the last version as well as the last none prerelease version, we would need to integrate a new get_new_prerelese_version function to be called on prereleases. The current get_new_version needs to be adjusted to ignore prerelease versions to prevent wrong determinations.

Personally I would find this feature really useful and I was glad to have it in the js world before. I would also offer to write the integration 😃

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jacksboxcommented, Feb 10, 2022
1reaction
jacksboxcommented, Feb 10, 2022

I started working - or let’s call it more exploring the codebase as preparation - on this task and came to the conclusion that this is not easily done without a lot of rewriting of the existing code as there are quite some obstacles:

  • it only runs on a certain branch, but prereleases will probably be done from feature branches instead of the release one
  • tags are just analysed in order, it is not checked if the tag is actually on the current branch. For prereleases we only want tags on the current branch…
  • please, not be offended by this last point, it is meant as helpful critic: the codebase feels a bit messy and unstructured - i spend quite some time exploring what is going on and where and found it hard to follow - if we compare it to the semantic-release src code (which seems to be the inspiration for this package) it is much more easy to follow and thus to extend… Edit: there is a Issue about making this project plugin based which could be a good step to alleviate this Edit 2: my. main painpoint why I wrote this is probably the parsing of current and previous version - current versions are parsed from tag or file, while previous versions are parsed from commit msg - all parsings are done slightly different (regex, str compare, …) which seems a bit error prone (especially the commit parsing). Maybe this could be unified, e.g. by only using tags, or only using commit messages… I guess I’ll create an issue about this with some proposals.

All in all, I won’t continue working on this tasks, as I would need to change so much basic functionality and without some bigger refactoring the only way to implement this would be a hacky solution…

PS: I’m all up for some bigger refactoring, but I think that should be discussed by more maintainers…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prerelease - MTG Wiki - Fandom
The options were Azorius, Izzet, Rakdos, Golgari, and Selesnya. Each Guild Prerelease Pack contained five Return to Ravnica booster packs, a guild-specific ...
Read more >
The Magic Prerelease Primer: Everything You Need to Know
My personal choice is to just hop onto MTG Arena and play a Sealed event. The price is comparable to a prerelease, you...
Read more >
Pre-release features - Configuration Manager - Microsoft Learn
Pre-release features are features that are in the current branch for early testing in a production environment.
Read more >
Prerelease option · Issue #394 · google-github-actions/release ...
E.g., I had changes in 3 packages and It created 3 releases out of which only the first one was created as prerelease....
Read more >
Streets of New Capenna Prerelease Primer - Magic.gg
No matter who you pick, the Prerelease at your local game store is going to be the best place to try out the...
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