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

QUESTION: Do channels support *-alpha.1 *-alpha.2, or are they limited to *-alpha? #8500

Open
rathboma opened this issue Sep 18, 2024 · 2 comments

Comments

@rathboma
Copy link

Hey folks,

Quick question:

  1. The docs only provide examples using the syntax 1.0.0-alpha for an alpha build (docs link).
  2. Various issues suggest that syntax such as 1.0.0-alpha.1 is also supported

Can I ask for clarity on which it is? Happy to make a PR for the docs once I understand how it works.

Thanks!

@mmaietta
Copy link
Collaborator

Looks like the version is supported for being parsed https://www.electron.build/app-builder-lib.interface.platformspecificbuildoptions#detectupdatechannel

But the update channel will be parsed as alpha without the version number

/**
* Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.
* @default true
*/
readonly detectUpdateChannel?: boolean

/**
if this is an "alpha" version, we need to generate only the "alpha" .yml file
if this is a "beta" version, we need to generate both the "alpha" and "beta" .yml file
if this is a "stable" version, we need to generate all the "alpha", "beta" and "stable" .yml file
*/
function computeChannelNames(packager: PlatformPackager<any>, publishConfig: PublishConfiguration): Array<string> {
const currentChannel: string = (publishConfig as GenericServerOptions).channel || "latest"
// for GitHub should be pre-release way be used
if (currentChannel === "alpha" || publishConfig.provider === "github" || !isGenerateUpdatesFilesForAllChannels(packager)) {
return [currentChannel]
}
switch (currentChannel) {
case "beta":
return [currentChannel, "alpha"]
case "latest":
return [currentChannel, "alpha", "beta"]
default:
return [currentChannel]
}
}

@DanielMcAssey
Copy link
Contributor

@mmaietta is the authority on this, but thought I would throw in my 2 pence.
We have been using *-alpha.2 *-beta.14, etc for a good while now in production with many users, and updates have worked flawlessly (We use S3)

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

No branches or pull requests

3 participants