Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update variable names
Signed-off-by: Harta Angkasa <24356946+ItsHarta@users.noreply.github.com>
  • Loading branch information
ItsHarta committed Feb 2, 2026
commit 4c563d8b65a519ccd0b69df3d5639b5801cdffa6
22 changes: 11 additions & 11 deletions build-automation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ const checkIfThereAreNewVersions = async (github) => {
const { stdout } = await exec(`ls ${supportedVersion}`);
const baseVersions = stdout.trim().split("\n");

const debianVersion = baseVersions.find(v => !v.startsWith("alpine"));
const { stdout: debianVersionOutput } = await exec(`. ./functions.sh && get_full_version ./${supportedVersion}/${debianVersion}`, { shell: "bash" });
const standardVersion = baseVersions.find(v => !v.startsWith("alpine"));
const { stdout: standardVersionOutput } = await exec(`. ./functions.sh && get_full_version ./${supportedVersion}/${standardVersion}`, { shell: "bash" });

const alpineVersion = baseVersions.find(v => v.startsWith("alpine"));
const { stdout: alpineVersionOutput } = await exec(`. ./functions.sh && get_full_version ./${supportedVersion}/${alpineVersion}`, { shell: "bash" });

const fullVersion = { debian : debianVersionOutput.trim(), alpine: alpineVersionOutput.trim() };
console.log(`${supportedVersion}: debian=${fullVersion.debian}, alpine=${fullVersion.alpine}`);
const fullVersion = { main : standardVersionOutput.trim(), alpine: alpineVersionOutput.trim() };
console.log(`${supportedVersion}: main=${fullVersion.main}, alpine=${fullVersion.alpine}`);

latestSupportedVersions[supportedVersion] = {
fullVersion: fullVersion.debian,
fullVersion: fullVersion.main,
alpineVersion: fullVersion.alpine,
alpineIsBehind: fullVersion.debian !== fullVersion.alpine
alpineIsBehind: fullVersion.main !== fullVersion.alpine
};
}

Expand All @@ -56,17 +56,17 @@ const checkIfThereAreNewVersions = async (github) => {

const availableFullVersion = `${availableMajor}.${availableMinor}.${availablePatch}`;

const newDebian = Number(availableMinor) > Number(latestMinor) || (availableMinor === latestMinor && Number(availablePatch) > Number(latestPatch));
const newMainline = Number(availableMinor) > Number(latestMinor) || (availableMinor === latestMinor && Number(availablePatch) > Number(latestPatch));
const newAlpine = Number(availableMinor) > Number(alpineMinor) || (availableMinor === alpineMinor && Number(availablePatch) > Number(alpinePatch));

const isCatchup = supported.alpineIsBehind && newAlpine && availableFullVersion === supported.fullVersion;

// Alpine will be always behind or equal to Debian
// So if Debian is new version, then alpineOnly is always false. And vice versa
if (newDebian || isCatchup) {
// Alpine will be always behind or equal to main
// So if main is new version, then alpineOnly is always false. And vice versa
if (newMainline || isCatchup) {
filteredNewerVersions[availableMajor] = {
fullVersion: availableFullVersion,
alpineOnly: !newDebian
alpineOnly: !newMainline
};
Comment thread
ItsHarta marked this conversation as resolved.
}
}
Expand Down