Skip to content

Commit 64ec928

Browse files
[pulsar-updater] Don't prompt to update on non-default release channels (#1185)
* [pulsar-updater] Don't prompt to update on non-default release channels * [pulsar-updater] Fix spec
1 parent 316dfd1 commit 64ec928

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

packages/pulsar-updater/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Since a major part of the functionality of this package is attempting to determi
3030
* Universal: Developer Mode
3131
* Universal: Safe Mode
3232
* Universal: Spec Mode
33-
* Universal: Developer Instance
33+
* Universal: Custom Release Channel
3434
* Windows: Chocolatey Installation
3535
* Windows: winget Installation
3636
* Windows: User Installation

packages/pulsar-updater/spec/find-install-method-spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ describe("find-install-method main", async () => {
55
const platform = process.platform;
66
const arch = process.arch;
77

8-
it("Returns developer instance if applicable", async () => {
8+
it("Returns custom release channel if applicable", async () => {
99
// We can't mock the atom api return from a package,
1010
// So we will just know that if tests are running, it's in the Atom SpecMode
1111

1212
let method = await findInstallMethod();
1313

14-
expect(method.installMethod).toBe("Developer Instance");
14+
expect(method.installMethod).toBe("Custom Release Channel");
1515
expect(method.platform).toBe(platform);
1616
expect(method.arch).toBe(arch);
1717
});

packages/pulsar-updater/src/find-install-method.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ async function main() {
7777
returnValue = "Spec Mode";
7878
}
7979

80-
if (atom.getVersion().endsWith("-dev")) {
80+
if (atom.getReleaseChannel() !== 'stable') {
8181
// This would only be the case if
82-
// 1. `yarn start` was used by a developer
83-
// 2. Someone built a local binary without removing `-dev` from the version
84-
returnValue = "Developer Instance";
82+
//
83+
// * `yarn start` was used by a developer,
84+
// * someone built a local binary without removing `-dev` from the version,
85+
// or
86+
// * someone was using a preview build of PulsarNext.
87+
returnValue = 'Custom Release Channel';
8588
}
8689

8790
if (returnValue.length > 0) {

packages/pulsar-updater/src/main.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,10 @@ class PulsarUpdater {
162162
break;
163163
case "Safe Mode":
164164
return null;
165-
break;
166165
case "Spec Mode":
167166
return null;
168-
break;
169-
case "Developer Instance":
167+
case "Custom Release Channel":
170168
return null;
171-
break;
172169
case "Flatpak Installation":
173170
returnText += "Install the latest version by running `flatpak update`.";
174171
break;

0 commit comments

Comments
 (0)