Skip to content

Commit

Permalink
bump up to v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Dec 11, 2019
1 parent efbfaac commit 701ed14
Show file tree
Hide file tree
Showing 90 changed files with 21,087 additions and 76 deletions.
91 changes: 17 additions & 74 deletions lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const os = __importStar(require("os"));
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const semver = __importStar(require("semver"));
const yaml = __importStar(require("js-yaml"));
const osPlat = os.platform();
const osArch = os.arch();
if (!tempDirectory) {
Expand All @@ -31,79 +32,21 @@ if (!tempDirectory) {
}
tempDirectory = path.join(baseLocation, 'actions', 'temp');
}
const availableVersions = process.platform === 'win32'
? [
// available versions in windows
'5.30.1',
'5.30.0',
'5.28.2',
'5.28.1',
'5.28.0',
'5.26.3',
'5.26.2',
'5.26.1',
'5.26.0',
'5.24.4',
'5.24.3',
'5.24.2',
'5.24.1',
'5.24.0'
]
: [
// available versions in linux and macOS
'5.30.1',
'5.30.0',
'5.28.2',
'5.28.1',
'5.28.0',
'5.26.3',
'5.26.2',
'5.26.1',
'5.26.0',
'5.24.4',
'5.24.3',
'5.24.2',
'5.24.1',
'5.24.0',
'5.22.4',
'5.22.3',
'5.22.2',
'5.22.1',
'5.22.0',
'5.20.3',
'5.20.2',
'5.20.1',
'5.20.0',
'5.18.4',
'5.18.3',
'5.18.2',
'5.18.1',
'5.18.0',
'5.16.3',
'5.16.2',
'5.16.1',
'5.16.0',
'5.14.4',
'5.14.3',
'5.14.2',
'5.14.1',
'5.14.0',
'5.12.5',
'5.12.4',
'5.12.3',
'5.12.2',
'5.12.1',
'5.12.0',
'5.10.1',
'5.10.1',
'5.10.0',
'5.8.9',
'5.8.8',
'5.8.7',
'5.8.6',
'5.8.5'
];
function determineVersion(version) {
async function getAvailableVersions() {
return new Promise((resolve, reject) => {
fs.readFile(path.join(__dirname, '..', '.github', 'workflows', `${osPlat}.yml`), (err, data) => {
if (err) {
reject(err);
}
const info = yaml.safeLoad(data.toString());
resolve(info);
});
}).then((info) => {
return info.jobs.build.strategy.matrix.perl;
});
}
async function determineVersion(version) {
const availableVersions = await getAvailableVersions();
for (let v of availableVersions) {
if (semver.satisfies(v, version)) {
return v;
Expand All @@ -112,7 +55,7 @@ function determineVersion(version) {
throw new Error('unable to get latest version');
}
async function getPerl(version) {
const selected = determineVersion(version);
const selected = await determineVersion(version);
// check cache
let toolPath;
toolPath = tc.find('perl', selected);
Expand Down
2 changes: 2 additions & 0 deletions lib/setup-perl.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ async function run() {
}
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'perl.json')}`);
// for cpanm and carton
core.addPath(path.join(__dirname, '..', 'bin'));
}
catch (error) {
core.setFailed(error.message);
Expand Down
185 changes: 185 additions & 0 deletions node_modules/argparse/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/argparse/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 701ed14

Please sign in to comment.