From 037d1d3904491f46254b1cb722c0c5156f5a444b Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 21 Feb 2023 13:09:36 +0100 Subject: [PATCH] Update custom package version --- .licenses/npm/@actions/cache.dep.yml | 2 +- dist/check-only/index.js | 20 ++++++++------------ package-lock.json | 12 ++++++------ package.json | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.licenses/npm/@actions/cache.dep.yml b/.licenses/npm/@actions/cache.dep.yml index ddbc316..f9f6985 100644 --- a/.licenses/npm/@actions/cache.dep.yml +++ b/.licenses/npm/@actions/cache.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/cache" -version: 3.1.4 +version: 3.1.5 type: npm summary: homepage: diff --git a/dist/check-only/index.js b/dist/check-only/index.js index c5345e7..876dd7f 100644 --- a/dist/check-only/index.js +++ b/dist/check-only/index.js @@ -1152,12 +1152,13 @@ function unlinkFile(filePath) { }); } exports.unlinkFile = unlinkFile; -function getVersion(app) { +function getVersion(app, additionalArgs = []) { return __awaiter(this, void 0, void 0, function* () { - core.debug(`Checking ${app} --version`); let versionOutput = ''; + additionalArgs.push('--version'); + core.debug(`Checking ${app} ${additionalArgs.join(' ')}`); try { - yield exec.exec(`${app} --version`, [], { + yield exec.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, silent: true, listeners: { @@ -1177,19 +1178,14 @@ function getVersion(app) { // Use zstandard if possible to maximize cache performance function getCompressionMethod() { return __awaiter(this, void 0, void 0, function* () { - const versionOutput = yield getVersion('zstd'); + const versionOutput = yield getVersion('zstd', ['--quiet']); const version = semver.clean(versionOutput); - if (!versionOutput.toLowerCase().includes('zstd command line interface')) { - // zstd is not installed + core.debug(`zstd version: ${version}`); + if (versionOutput === '') { return constants_1.CompressionMethod.Gzip; } - else if (!version || semver.lt(version, 'v1.3.2')) { - // zstd is installed but using a version earlier than v1.3.2 - // v1.3.2 is required to use the `--long` options in zstd - return constants_1.CompressionMethod.ZstdWithoutLong; - } else { - return constants_1.CompressionMethod.Zstd; + return constants_1.CompressionMethod.ZstdWithoutLong; } }); } diff --git a/package-lock.json b/package-lock.json index bbeaac3..d410882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "3.3.0", "license": "MIT", "dependencies": { - "@actions/cache": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.4.tgz", + "@actions/cache": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.5.tgz", "@actions/core": "^1.10.0", "@actions/exec": "^1.1.1", "@actions/io": "^1.1.2" @@ -36,9 +36,9 @@ } }, "node_modules/@actions/cache": { - "version": "3.1.4", - "resolved": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.4.tgz", - "integrity": "sha512-QdXk4YhfILpIUZBctx3Q7eM6cT/F1Pe7n0S09WyfAiZA991AfEXxzXgh8tKNhxf90rY62GDfOLvVr/0xieyQOg==", + "version": "3.1.5", + "resolved": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.5.tgz", + "integrity": "sha512-GN5fFSW8Le8ITPvjPgotxI+V4yZYtORxfab6i3GfNQ7f+qbi7JqWOsKEYJvI9eKSdWp3YPiekzRrKUpNRrmziQ==", "license": "MIT", "dependencies": { "@actions/core": "^1.10.0", @@ -9723,8 +9723,8 @@ }, "dependencies": { "@actions/cache": { - "version": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.4.tgz", - "integrity": "sha512-QdXk4YhfILpIUZBctx3Q7eM6cT/F1Pe7n0S09WyfAiZA991AfEXxzXgh8tKNhxf90rY62GDfOLvVr/0xieyQOg==", + "version": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.5.tgz", + "integrity": "sha512-GN5fFSW8Le8ITPvjPgotxI+V4yZYtORxfab6i3GfNQ7f+qbi7JqWOsKEYJvI9eKSdWp3YPiekzRrKUpNRrmziQ==", "requires": { "@actions/core": "^1.10.0", "@actions/exec": "^1.0.1", diff --git a/package.json b/package.json index 67e9dcb..1257d8e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@actions/cache": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.4.tgz", + "@actions/cache": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.5.tgz", "@actions/core": "^1.10.0", "@actions/exec": "^1.1.1", "@actions/io": "^1.1.2"