Skip to content

Commit

Permalink
Merge branch 'main' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Dec 12, 2022
2 parents e324fe3 + 7e22932 commit 26c6070
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
18 changes: 9 additions & 9 deletions scripts/common/cpanfile.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ DISTRIBUTIONS
overload 0
strict 0
warnings 0
IO-Socket-SSL-2.077
pathname: S/SU/SULLR/IO-Socket-SSL-2.077.tar.gz
IO-Socket-SSL-2.078
pathname: S/SU/SULLR/IO-Socket-SSL-2.078.tar.gz
provides:
IO::Socket::SSL 2.077
IO::Socket::SSL 2.078
IO::Socket::SSL::Intercept 2.056
IO::Socket::SSL::OCSP_Cache 2.077
IO::Socket::SSL::OCSP_Resolver 2.077
IO::Socket::SSL::OCSP_Cache 2.078
IO::Socket::SSL::OCSP_Resolver 2.078
IO::Socket::SSL::PublicSuffix undef
IO::Socket::SSL::SSL_Context 2.077
IO::Socket::SSL::SSL_HANDLE 2.077
IO::Socket::SSL::Session_Cache 2.077
IO::Socket::SSL::Trace 2.077
IO::Socket::SSL::SSL_Context 2.078
IO::Socket::SSL::SSL_HANDLE 2.078
IO::Socket::SSL::Session_Cache 2.078
IO::Socket::SSL::Trace 2.078
IO::Socket::SSL::Utils 2.015
requirements:
ExtUtils::MakeMaker 0
Expand Down
18 changes: 9 additions & 9 deletions scripts/windows/cpanfile.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,18 @@ DISTRIBUTIONS
Exporter 5.57
ExtUtils::MakeMaker 0
perl 5.008
IO-Socket-SSL-2.077
pathname: S/SU/SULLR/IO-Socket-SSL-2.077.tar.gz
IO-Socket-SSL-2.078
pathname: S/SU/SULLR/IO-Socket-SSL-2.078.tar.gz
provides:
IO::Socket::SSL 2.077
IO::Socket::SSL 2.078
IO::Socket::SSL::Intercept 2.056
IO::Socket::SSL::OCSP_Cache 2.077
IO::Socket::SSL::OCSP_Resolver 2.077
IO::Socket::SSL::OCSP_Cache 2.078
IO::Socket::SSL::OCSP_Resolver 2.078
IO::Socket::SSL::PublicSuffix undef
IO::Socket::SSL::SSL_Context 2.077
IO::Socket::SSL::SSL_HANDLE 2.077
IO::Socket::SSL::Session_Cache 2.077
IO::Socket::SSL::Trace 2.077
IO::Socket::SSL::SSL_Context 2.078
IO::Socket::SSL::SSL_HANDLE 2.078
IO::Socket::SSL::Session_Cache 2.078
IO::Socket::SSL::Trace 2.078
IO::Socket::SSL::Utils 2.015
requirements:
ExtUtils::MakeMaker 0
Expand Down
17 changes: 13 additions & 4 deletions src/setup-perl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,19 @@ async function resolveVersionInput(): Promise<string> {
return version;
}

const versionFilePath = path.join(process.env.GITHUB_WORKSPACE || "", versionFile || ".python-version");
version = await fs.readFile(versionFilePath, "utf8");
core.info(`Resolved ${versionFile} as ${version}`);
return version;
try {
const versionFilePath = path.join(process.env.GITHUB_WORKSPACE || "", versionFile || ".perl-version");
version = await fs.readFile(versionFilePath, "utf8");
core.info(`Resolved ${versionFile} as ${version}`);
return version;
} catch (err) {
if ((err as any)?.code !== "ENOENT" || versionFile) {
throw err;
}
}

// use the default version.
return "5";
}

run();

0 comments on commit 26c6070

Please sign in to comment.