Skip to content

Commit

Permalink
fix(terraform): correct channel for stable and non-stable (rc, beta, …
Browse files Browse the repository at this point in the history
…alpha)
  • Loading branch information
coolaj86 committed Dec 16, 2024
1 parent f1d1027 commit 6320c51
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion terraform/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

let Fetcher = require('../_common/fetcher.js');

let alphaRe = /\d-alpha\d/;
let betaRe = /\d-beta\d/;
let rcRe = /\d-rc\d/;

/**
* @typedef BuildInfo
* @prop {String} version
Expand Down Expand Up @@ -36,14 +40,26 @@ async function getDistributables() {

for (let version of allVersions) {
for (let build of releases.versions[version].builds) {
let channel = 'stable';
let isRc = rcRe.test(version);
let isBeta = betaRe.test(version);
let isAlpha = alphaRe.test(version);
if (isRc) {
channel = 'rc';
} else if (isBeta) {
channel = 'beta';
} else if (isAlpha) {
channel = 'alpha';
}

let r = {
version: build.version,
download: build.url,
// These are generic enough for the autodetect,
// and the per-file logic has proven to get outdated sooner
//os: convert[build.os],
//arch: convert[build.arch],
//channel: 'stable|-rc|-beta|-alpha',
channel: channel,
};
all.releases.push(r);
}
Expand Down

0 comments on commit 6320c51

Please sign in to comment.