Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pulsar-updater] Don't prompt to update on non-default release channels #1185

Conversation

savetheclocktower
Copy link
Contributor

For PulsarNext I had tied myself in knots trying to guarantee that Pulsar would always know which release channel it was running in — e.g., that PulsarNext would never try to use ~/.pulsar as ATOM_HOME, and Pulsar would never think that ppm-next was the binary it should run to find out which packages the user had installed.

I should've done the simplest thing first and leaned into the release channel infrastructure that was already in place from the Atom days. If your version number ends in -foo, then you're in the -foo release channel. So the version 1.124.12345678-next is recognized as belonging to the next release channel, and the existing atom.getReleaseChannel() method makes this easy to inspect from anywhere in the core or in package code.

But once I did this and rebuilt PulsarNext, pulsar-updater pushed me to upgrade! That's because it only checked for the -dev string at the end of the version, rather than any non-standard release channels.

The default return value is stable — that's the release channel you'll receive when the version number is something like 1.124.0 and you call atom.getReleaseChannel(). So that's the change I made. It should work equally well in the -dev case, since that makes Pulsar think we're in a release channel called dev.

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes total sense to change now as seeing how pulsar-next is affecting it.

We may want to update our proper release channels in core considering as they currently report "dev", "stable", "beta", and "nightly" (iirc) and we would probably want to report "stable", "dev", and "next" or just "stable" and "next"?

But in any case, this PR looks good to me and touches all the places that matter within pulsar-updater so we should be good to merge!

@savetheclocktower
Copy link
Contributor Author

We may want to update our proper release channels in core considering as they currently report "dev", "stable", "beta", and "nightly" (iirc) and we would probably want to report "stable", "dev", and "next" or just "stable" and "next"?

There are a couple places in the codebase that reference the nightly and beta channels, but they are fewer than I imagined.

dev makes sense to treat as a release channel to the extent that it isn't stable, so we know not to treat it like a stable release, but otherwise it functions as a quasi-release channel.

@savetheclocktower savetheclocktower merged commit 64ec928 into pulsar-edit:master Jan 7, 2025
102 of 103 checks passed
@savetheclocktower savetheclocktower deleted the fix-pulsar-updater-release-channel-behavior branch January 7, 2025 01:25
savetheclocktower added a commit that referenced this pull request Jan 14, 2025
…ls (#1185)

* [pulsar-updater] Don't prompt to update on non-default release channels

* [pulsar-updater] Fix spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants