Skip to content

Commit

Permalink
fix: fix support for go beta releases
Browse files Browse the repository at this point in the history
closes actions#96
  • Loading branch information
pjvds committed Jan 19, 2021
1 parent 3b4dc6c commit b71cf1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5161,7 +5161,9 @@ function findMatch(versionSpec, stable) {
core.debug(`matched ${candidate.version}`);
match = candidate;
break;
}
} else {
core.debug(`version statisfied ${candidateversion}, but coulnd't find supported platform and/or architecture`);
}
}
}
if (match && goFile) {
Expand Down
16 changes: 11 additions & 5 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,17 @@ export async function findMatch(
version = version + '.0';
}

core.debug(`check ${version} satisfies ${versionSpec}`);
if (
semver.satisfies(version, versionSpec) &&
(!stable || candidate.stable === stable)
) {
let satisfied = semver.satisfies(version, versionSpec);

if(!satisfied) {
core.debug(`${version} doesn't satisfy ${versionSpec}`);
continue;
}

core.debug(`${version} does satisfy ${versionSpec}`);

if (!stable || candidate.stable === stable)
{
goFile = candidate.files.find(file => {
core.debug(
`${file.arch}===${archFilter} && ${file.os}===${platFilter}`
Expand Down

0 comments on commit b71cf1e

Please sign in to comment.