1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-03-31 20:17:48 +02:00

Update custom package version

This commit is contained in:
Marc Mueller 2023-02-21 13:09:36 +01:00
parent 04984d790b
commit 037d1d3904
4 changed files with 16 additions and 20 deletions

View file

@ -1,6 +1,6 @@
---
name: "@actions/cache"
version: 3.1.4
version: 3.1.5
type: npm
summary:
homepage:

View file

@ -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;
}
});
}

12
package-lock.json generated
View file

@ -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",

View file

@ -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"