From 3025f77b29eb464424f2488e4220a0c00639cca4 Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Thu, 27 Apr 2023 01:52:39 +0000 Subject: [PATCH] fix: revert main script path changes --- action.yml | 4 ++-- dist/{setup => }/index.js | 4 ++-- package.json | 4 ++-- src/installer.ts | 2 +- src/setup-dotnet.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename dist/{setup => }/index.js (99%) diff --git a/action.yml b/action.yml index e44ea9b..a10d16f 100644 --- a/action.yml +++ b/action.yml @@ -22,12 +22,12 @@ inputs: required: false default: false outputs: - cache-hit: + cache-hit: description: 'A boolean value to indicate if a cache was hit.' dotnet-version: description: 'Contains the installed by action .NET SDK version for reuse.' runs: using: 'node16' - main: 'dist/setup/index.js' + main: 'dist/index.js' post: 'dist/cache-save/index.js' post-if: success() diff --git a/dist/setup/index.js b/dist/index.js similarity index 99% rename from dist/setup/index.js rename to dist/index.js index 199fa23..10b63ee 100644 --- a/dist/setup/index.js +++ b/dist/index.js @@ -71288,7 +71288,7 @@ class DotnetCoreInstaller { ]; const scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh'; const escapedScript = path_1.default - .join(__dirname, '..', '..', 'externals', scriptName) + .join(__dirname, '..', 'externals', scriptName) .replace(/'/g, "''"); let scriptArguments; let scriptPath = ''; @@ -71496,7 +71496,7 @@ function run() { else { core.setOutput(constants_1.Outputs.CacheHit, false); } - const matchersPath = path_1.default.join(__dirname, '..', '..', '.github'); + const matchersPath = path_1.default.join(__dirname, '..', '.github'); core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`); } catch (error) { diff --git a/package.json b/package.json index 66ab533..049475f 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "3.0.2", "private": true, "description": "setup dotnet action", - "main": "dist/setup/index.js", + "main": "dist/index.js", "scripts": { - "build": "ncc build -o dist/setup src/setup-dotnet.ts && ncc build -o dist/cache-save src/cache-save.ts", + "build": "ncc build src/setup-dotnet.ts && ncc build -o dist/cache-save src/cache-save.ts", "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", "format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"", "lint": "eslint --config ./.eslintrc.js \"**/*.ts\"", diff --git a/src/installer.ts b/src/installer.ts index 8dc26bc..ef9e993 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -188,7 +188,7 @@ export class DotnetCoreInstaller { ]; const scriptName = IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh'; const escapedScript = path - .join(__dirname, '..', '..', 'externals', scriptName) + .join(__dirname, '..', 'externals', scriptName) .replace(/'/g, "''"); let scriptArguments: string[]; let scriptPath = ''; diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index 542e45d..e8374fa 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -101,7 +101,7 @@ export async function run() { core.setOutput(Outputs.CacheHit, false); } - const matchersPath = path.join(__dirname, '..', '..', '.github'); + const matchersPath = path.join(__dirname, '..', '.github'); core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`); } catch (error) { core.setFailed(error.message);