nuts
nuts copied to clipboard
Prerelease channel updates across releases
I'm hoping to start using nuts and I ran into a small problem. I want nuts to manage updates for two private prerelease channels (alpha and beta) in addition to public stable production channel. I want the alpha and beta clients to always get the latest available prerelease on their channel, even if it is for a different stable release. In other words, if an alpha client is currently at version 1.1.1-alpha.2 and 1.1.2-alpha.1 is available I want nuts to respond to the client's request to /updates/osx/1.1.1-alpha.2
with information about 1.1.2-alpha.1, and not just the latest stable release, 1.1.2.
I understand that the existing behavior is driven by the semver module that nuts uses. And the semver authors explicitly state that they do not support the functionality that I'm looking for. The semver-extra module offers more flexibility for working with prereleases, and it seems to have been created largely out of frustration with semver's limitations in this area.
Is there an easy way to solve this problem with nuts? (Maybe there's something I'm missing.) Or, if not, would you be open to a PR with changes to support this kind of prerelease update?
I agree, this is something that we also wanted for our desktop application.
I think it should be available as an option of the update endpoint, a type
query parameter that can be alpha
or beta
or stable
(default value).
Basically, if we have these versions: 1.0.0-alpha.1
, 1.0.0-beta.1
, 1.0.1
, 2.0.0-alpha.1
:
Current version | Prerelease parameter | Proposed version |
---|---|---|
1.0.0-alpha.1 |
nothing or beta |
1.0.0-beta.1 |
1.0.0-alpha.1 |
alpha |
2.0.0-alpha.1 |
1.0.1 |
alpha |
2.0.0-alpha.1 |
1.0.1 |
beta |
nothing |
1.0.1 |
nothing (aka stable ) |
nothing |
You'll need to store in your application a settings value for the type
parameter, if the user installed an alpha or beta version, you store the type.
I'm open for a PR about this, if you can't make one, I'll try to find time to proposed one (probably not before 2016).
That sounds great! Glad to hear this has been on your radar.
Hopefully I'll have time to work on a PR before too long.
I'm guessing that this can be closed now?
Actually I'd still like to see this