mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-15 23:26:31 +00:00
chore: generate
This commit is contained in:
parent
07468db4ce
commit
54d43b09b9
2 changed files with 4 additions and 42 deletions
23
dist/post_run/index.js
generated
vendored
23
dist/post_run/index.js
generated
vendored
|
|
@ -88813,25 +88813,6 @@ const pathExists = async (path) => !!(await fs.promises.stat(path).catch(() => f
|
||||||
const getLintCacheDir = () => {
|
const getLintCacheDir = () => {
|
||||||
return path_1.default.resolve(`${process.env.HOME}/.cache/golangci-lint`);
|
return path_1.default.resolve(`${process.env.HOME}/.cache/golangci-lint`);
|
||||||
};
|
};
|
||||||
const getCacheDirs = () => {
|
|
||||||
// Not existing dirs are ok here: it works.
|
|
||||||
const skipPkgCache = core.getInput(`skip-pkg-cache`, { required: true }).trim();
|
|
||||||
const skipBuildCache = core.getInput(`skip-build-cache`, { required: true }).trim();
|
|
||||||
const dirs = [getLintCacheDir()];
|
|
||||||
if (skipBuildCache.toLowerCase() == "true") {
|
|
||||||
core.info(`Omitting ~/.cache/go-build from cache directories`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dirs.push(path_1.default.resolve(`${process.env.HOME}/.cache/go-build`));
|
|
||||||
}
|
|
||||||
if (skipPkgCache.toLowerCase() == "true") {
|
|
||||||
core.info(`Omitting ~/go/pkg from cache directories`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dirs.push(path_1.default.resolve(`${process.env.HOME}/go/pkg`));
|
|
||||||
}
|
|
||||||
return dirs;
|
|
||||||
};
|
|
||||||
const getIntervalKey = (invalidationIntervalDays) => {
|
const getIntervalKey = (invalidationIntervalDays) => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const secondsSinceEpoch = now.getTime() / 1000;
|
const secondsSinceEpoch = now.getTime() / 1000;
|
||||||
|
|
@ -88878,7 +88859,7 @@ async function restoreCache() {
|
||||||
}
|
}
|
||||||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
||||||
try {
|
try {
|
||||||
const cacheKey = await cache.restoreCache(getCacheDirs(), primaryKey, restoreKeys);
|
const cacheKey = await cache.restoreCache([getLintCacheDir()], primaryKey, restoreKeys);
|
||||||
if (!cacheKey) {
|
if (!cacheKey) {
|
||||||
core.info(`Cache not found for input keys: ${[primaryKey, ...restoreKeys].join(", ")}`);
|
core.info(`Cache not found for input keys: ${[primaryKey, ...restoreKeys].join(", ")}`);
|
||||||
return;
|
return;
|
||||||
|
|
@ -88908,7 +88889,7 @@ async function saveCache() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
const cacheDirs = getCacheDirs();
|
const cacheDirs = [getLintCacheDir()];
|
||||||
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
|
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
|
||||||
if (!primaryKey) {
|
if (!primaryKey) {
|
||||||
utils.logWarning(`Error retrieving key from state.`);
|
utils.logWarning(`Error retrieving key from state.`);
|
||||||
|
|
|
||||||
23
dist/run/index.js
generated
vendored
23
dist/run/index.js
generated
vendored
|
|
@ -88813,25 +88813,6 @@ const pathExists = async (path) => !!(await fs.promises.stat(path).catch(() => f
|
||||||
const getLintCacheDir = () => {
|
const getLintCacheDir = () => {
|
||||||
return path_1.default.resolve(`${process.env.HOME}/.cache/golangci-lint`);
|
return path_1.default.resolve(`${process.env.HOME}/.cache/golangci-lint`);
|
||||||
};
|
};
|
||||||
const getCacheDirs = () => {
|
|
||||||
// Not existing dirs are ok here: it works.
|
|
||||||
const skipPkgCache = core.getInput(`skip-pkg-cache`, { required: true }).trim();
|
|
||||||
const skipBuildCache = core.getInput(`skip-build-cache`, { required: true }).trim();
|
|
||||||
const dirs = [getLintCacheDir()];
|
|
||||||
if (skipBuildCache.toLowerCase() == "true") {
|
|
||||||
core.info(`Omitting ~/.cache/go-build from cache directories`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dirs.push(path_1.default.resolve(`${process.env.HOME}/.cache/go-build`));
|
|
||||||
}
|
|
||||||
if (skipPkgCache.toLowerCase() == "true") {
|
|
||||||
core.info(`Omitting ~/go/pkg from cache directories`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dirs.push(path_1.default.resolve(`${process.env.HOME}/go/pkg`));
|
|
||||||
}
|
|
||||||
return dirs;
|
|
||||||
};
|
|
||||||
const getIntervalKey = (invalidationIntervalDays) => {
|
const getIntervalKey = (invalidationIntervalDays) => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const secondsSinceEpoch = now.getTime() / 1000;
|
const secondsSinceEpoch = now.getTime() / 1000;
|
||||||
|
|
@ -88878,7 +88859,7 @@ async function restoreCache() {
|
||||||
}
|
}
|
||||||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
||||||
try {
|
try {
|
||||||
const cacheKey = await cache.restoreCache(getCacheDirs(), primaryKey, restoreKeys);
|
const cacheKey = await cache.restoreCache([getLintCacheDir()], primaryKey, restoreKeys);
|
||||||
if (!cacheKey) {
|
if (!cacheKey) {
|
||||||
core.info(`Cache not found for input keys: ${[primaryKey, ...restoreKeys].join(", ")}`);
|
core.info(`Cache not found for input keys: ${[primaryKey, ...restoreKeys].join(", ")}`);
|
||||||
return;
|
return;
|
||||||
|
|
@ -88908,7 +88889,7 @@ async function saveCache() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
const cacheDirs = getCacheDirs();
|
const cacheDirs = [getLintCacheDir()];
|
||||||
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
|
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
|
||||||
if (!primaryKey) {
|
if (!primaryKey) {
|
||||||
utils.logWarning(`Error retrieving key from state.`);
|
utils.logWarning(`Error retrieving key from state.`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue