Skip to content

Commit

Permalink
chore: Attempt to fix fcli version aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Oct 26, 2023
1 parent 399a668 commit bfaa7ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions setup/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6668,11 +6668,13 @@ const FCLI_SHA256 = {
function updateFcliVersionAliases() {
for (const slug in FCLI_SHA256) {
const version = slug.substring(0, slug.indexOf('/'));
const alias1 = version.substring(0, version.indexOf('.'));
const alias2 = version.substring(0, version.lastIndexOf('.'));
core.info(`${version} (${slug}) aliases: ${alias1} ${alias2}`);
TOOLS["fcli"]["versionAliases"][alias1] = version;
TOOLS["fcli"]["versionAliases"][alias2] = version;
const minorAlias = version.substring(0, version.lastIndexOf('.'));
const majorAlias = version.substring(0, version.indexOf('.'));
if (!TOOLS["fcli"]["versionAliases"][minorAlias]) {
core.info(`${version} (${slug}) aliases: ${minorAlias} ${majorAlias}`);
TOOLS["fcli"]["versionAliases"][minorAlias] = version;
TOOLS["fcli"]["versionAliases"][majorAlias] = version;
}
}
}
/**
Expand Down
12 changes: 7 additions & 5 deletions setup/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ const FCLI_SHA256: Record<string, string> = {
function updateFcliVersionAliases() {
for ( const slug in FCLI_SHA256 ) {
const version = slug.substring(0, slug.indexOf('/'));
const alias1 = version.substring(0, version.indexOf('.'));
const alias2 = version.substring(0, version.lastIndexOf('.'));
core.info(`${version} (${slug}) aliases: ${alias1} ${alias2}`);
TOOLS["fcli"]["versionAliases"][alias1] = version;
TOOLS["fcli"]["versionAliases"][alias2] = version;
const minorAlias = version.substring(0, version.lastIndexOf('.'));
const majorAlias = version.substring(0, version.indexOf('.'));
if (!TOOLS["fcli"]["versionAliases"][minorAlias]) {
core.info(`${version} (${slug}) aliases: ${minorAlias} ${majorAlias}`);
TOOLS["fcli"]["versionAliases"][minorAlias] = version;
TOOLS["fcli"]["versionAliases"][majorAlias] = version;
}
}
}

Expand Down

0 comments on commit bfaa7ff

Please sign in to comment.