From 389f845bf706f0484729bc85ca24a9120022f8aa Mon Sep 17 00:00:00 2001 From: Christoph Witzko Date: Wed, 29 Jul 2020 16:53:16 +0200 Subject: [PATCH] feat: update dependencies --- dist/index.js | 40 +++++++++++++++++++++++++++++++++++++++- package-lock.json | 6 +++--- package.json | 2 +- src/index.js | 2 +- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4e6febe..f7c16d3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 @@ -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 * @@ -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 /***/ }), @@ -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) diff --git a/package-lock.json b/package-lock.json index 58888c1..d9ffc4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,9 +31,9 @@ "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" }, "@actions/tool-cache": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.5.5.tgz", - "integrity": "sha512-y/YO37BOaXzOEHpvoGZDLCwvg6XZWQ7Ala4Np4xzrKD1r48mff+K/GAmzXMejnApU7kgqC6lL/aCKTZDCrhdmw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.6.0.tgz", + "integrity": "sha512-+fyEBImPD3m5I0o6DflCO0NHY180LPoX8Lo6y4Iez+V17kO8kfkH0VHxb8mUdmD6hn9dWA9Ch1JA20fXoIYUeQ==", "requires": { "@actions/core": "^1.2.3", "@actions/exec": "^1.0.0", diff --git a/package.json b/package.json index e22e48d..7978bb5 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/index.js b/src/index.js index 9dfa485..a9edbc3 100644 --- a/src/index.js +++ b/src/index.js @@ -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)