Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Jul 29, 2020
1 parent 88191d3 commit 389f845
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 6 deletions.
40 changes: 39 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,7 @@ class HTTPError extends Error {
}
exports.HTTPError = HTTPError;
const IS_WINDOWS = process.platform === 'win32';
const IS_MAC = process.platform === 'darwin';
const userAgent = 'actions/tool-cache';
/**
* Download a tool from an url and stream it into a file
Expand Down Expand Up @@ -2315,6 +2316,36 @@ function extractTar(file, dest, flags = 'xz') {
});
}
exports.extractTar = extractTar;
/**
* Extract a xar compatible archive
*
* @param file path to the archive
* @param dest destination directory. Optional.
* @param flags flags for the xar. Optional.
* @returns path to the destination directory
*/
function extractXar(file, dest, flags = []) {
return __awaiter(this, void 0, void 0, function* () {
assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');
assert_1.ok(file, 'parameter "file" is required');
dest = yield _createExtractFolder(dest);
let args;
if (flags instanceof Array) {
args = flags;
}
else {
args = [flags];
}
args.push('-x', '-C', dest, '-f', file);
if (core.isDebug()) {
args.push('-v');
}
const xarPath = yield io.which('xar', true);
yield exec_1.exec(`"${xarPath}"`, _unique(args));
return dest;
});
}
exports.extractXar = extractXar;
/**
* Extract a zip
*
Expand Down Expand Up @@ -2623,6 +2654,13 @@ function _getGlobal(key, defaultValue) {
/* eslint-enable @typescript-eslint/no-explicit-any */
return value !== undefined ? value : defaultValue;
}
/**
* Returns an array of unique values.
* @param values Values to make unique.
*/
function _unique(values) {
return Array.from(new Set(values));
}
//# sourceMappingURL=tool-cache.js.map

/***/ }),
Expand Down Expand Up @@ -5079,7 +5117,7 @@ async function main () {
if (core.getInput('allow-initial-development-versions')) {
args.push('-allow-initial-development-versions')
}
const binPath = await installer('^1.21.3')
const binPath = await installer('^1.22.1')
try {
core.info('running semantic-release...')
await exec.exec(binPath, args)
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@actions/core": "^1.2.4",
"@actions/exec": "^1.0.4",
"@actions/tool-cache": "^1.5.5",
"@actions/tool-cache": "^1.6.0",
"semver": "^7.3.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function main () {
if (core.getInput('allow-initial-development-versions')) {
args.push('-allow-initial-development-versions')
}
const binPath = await installer('^1.21.3')
const binPath = await installer('^1.22.1')
try {
core.info('running semantic-release...')
await exec.exec(binPath, args)
Expand Down

0 comments on commit 389f845

Please sign in to comment.