mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-12 14:01:14 +00:00
chore: generate
This commit is contained in:
parent
77c258332f
commit
1063c681dc
2 changed files with 22 additions and 4 deletions
13
dist/post_run/index.js
generated
vendored
13
dist/post_run/index.js
generated
vendored
|
|
@ -97343,11 +97343,14 @@ const cache_1 = __nccwpck_require__(7377);
|
||||||
const install_1 = __nccwpck_require__(232);
|
const install_1 = __nccwpck_require__(232);
|
||||||
const patch_1 = __nccwpck_require__(7161);
|
const patch_1 = __nccwpck_require__(7161);
|
||||||
const execShellCommand = (0, util_1.promisify)(child_process_1.exec);
|
const execShellCommand = (0, util_1.promisify)(child_process_1.exec);
|
||||||
async function prepareEnv() {
|
async function prepareEnv(installOnly) {
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
// Prepare cache, lint and go in parallel.
|
// Prepare cache, lint and go in parallel.
|
||||||
await (0, cache_1.restoreCache)();
|
await (0, cache_1.restoreCache)();
|
||||||
const binPath = await (0, install_1.install)();
|
const binPath = await (0, install_1.install)();
|
||||||
|
if (installOnly) {
|
||||||
|
return { binPath, patchPath: `` };
|
||||||
|
}
|
||||||
const patchPath = await (0, patch_1.fetchPatch)();
|
const patchPath = await (0, patch_1.fetchPatch)();
|
||||||
core.info(`Prepared env in ${Date.now() - startedAt}ms`);
|
core.info(`Prepared env in ${Date.now() - startedAt}ms`);
|
||||||
return { binPath, patchPath };
|
return { binPath, patchPath };
|
||||||
|
|
@ -97483,8 +97486,14 @@ async function getConfigPath(binPath, userArgsMap, cmdArgs) {
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
const { binPath, patchPath } = await core.group(`prepare environment`, prepareEnv);
|
const installOnly = core.getBooleanInput(`install-only`, { required: true });
|
||||||
|
const { binPath, patchPath } = await core.group(`prepare environment`, () => {
|
||||||
|
return prepareEnv(installOnly);
|
||||||
|
});
|
||||||
core.addPath(path.dirname(binPath));
|
core.addPath(path.dirname(binPath));
|
||||||
|
if (installOnly) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await core.group(`run golangci-lint`, () => runLint(binPath, patchPath));
|
await core.group(`run golangci-lint`, () => runLint(binPath, patchPath));
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
|
||||||
13
dist/run/index.js
generated
vendored
13
dist/run/index.js
generated
vendored
|
|
@ -97343,11 +97343,14 @@ const cache_1 = __nccwpck_require__(7377);
|
||||||
const install_1 = __nccwpck_require__(232);
|
const install_1 = __nccwpck_require__(232);
|
||||||
const patch_1 = __nccwpck_require__(7161);
|
const patch_1 = __nccwpck_require__(7161);
|
||||||
const execShellCommand = (0, util_1.promisify)(child_process_1.exec);
|
const execShellCommand = (0, util_1.promisify)(child_process_1.exec);
|
||||||
async function prepareEnv() {
|
async function prepareEnv(installOnly) {
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
// Prepare cache, lint and go in parallel.
|
// Prepare cache, lint and go in parallel.
|
||||||
await (0, cache_1.restoreCache)();
|
await (0, cache_1.restoreCache)();
|
||||||
const binPath = await (0, install_1.install)();
|
const binPath = await (0, install_1.install)();
|
||||||
|
if (installOnly) {
|
||||||
|
return { binPath, patchPath: `` };
|
||||||
|
}
|
||||||
const patchPath = await (0, patch_1.fetchPatch)();
|
const patchPath = await (0, patch_1.fetchPatch)();
|
||||||
core.info(`Prepared env in ${Date.now() - startedAt}ms`);
|
core.info(`Prepared env in ${Date.now() - startedAt}ms`);
|
||||||
return { binPath, patchPath };
|
return { binPath, patchPath };
|
||||||
|
|
@ -97483,8 +97486,14 @@ async function getConfigPath(binPath, userArgsMap, cmdArgs) {
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
const { binPath, patchPath } = await core.group(`prepare environment`, prepareEnv);
|
const installOnly = core.getBooleanInput(`install-only`, { required: true });
|
||||||
|
const { binPath, patchPath } = await core.group(`prepare environment`, () => {
|
||||||
|
return prepareEnv(installOnly);
|
||||||
|
});
|
||||||
core.addPath(path.dirname(binPath));
|
core.addPath(path.dirname(binPath));
|
||||||
|
if (installOnly) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await core.group(`run golangci-lint`, () => runLint(binPath, patchPath));
|
await core.group(`run golangci-lint`, () => runLint(binPath, patchPath));
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue