diff --git a/dist/build-crates-standalone-main.js b/dist/build-crates-standalone-main.js index b5f066b..defe594 100644 --- a/dist/build-crates-standalone-main.js +++ b/dist/build-crates-standalone-main.js @@ -127161,16 +127161,16 @@ __nccwpck_require__.d(__webpack_exports__, { "cY": () => (/* binding */ setup) }); -// UNUSED EXPORTS: artifactName, artifactRegExp, cleanup +// UNUSED EXPORTS: artifactName, artifactRegExp -// EXTERNAL MODULE: external "fs/promises" -var promises_ = __nccwpck_require__(73292); // EXTERNAL MODULE: external "path" var external_path_ = __nccwpck_require__(71017); // EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js var lib_core = __nccwpck_require__(42186); // EXTERNAL MODULE: ./node_modules/@actions/artifact/lib/artifact.js var artifact = __nccwpck_require__(79450); +// EXTERNAL MODULE: external "fs/promises" +var promises_ = __nccwpck_require__(73292); // EXTERNAL MODULE: external "os" var external_os_ = __nccwpck_require__(22037); // EXTERNAL MODULE: ./node_modules/@actions/cache/lib/cache.js @@ -128475,7 +128475,6 @@ function describe(path = process.cwd()) { - const build_crates_standalone_artifact = new artifact.DefaultArtifactClient(); function setup() { const repo = lib_core.getInput("repo", { required: true }); @@ -128515,10 +128514,8 @@ async function main(input) { const { id } = await build_crates_standalone_artifact.uploadArtifact(output, [output], process.cwd()); lib_core.setOutput("artifact-id", id); lib_core.setOutput("artifact-name", output); - await cleanup(input); } catch (error) { - await cleanup(input); if (error instanceof Error) lib_core.setFailed(error.message); } @@ -128527,12 +128524,6 @@ function artifactName(repo, version, target) { return `${repo}-${version}-${target}-standalone.zip`; } const artifactRegExp = /^.*-standalone\.zip$/; -async function cleanup(input) { - const repoName = input.repo.split("/").at(1); - const repoPath = process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : repoName; - lib_core.info(`Deleting repository ${repoPath}`); - await promises_.rm(repoPath, { recursive: true, force: true }); -} /***/ }), diff --git a/dist/publish-crates-eclipse-main.js b/dist/publish-crates-eclipse-main.js index ef7735e..23b4a1a 100644 --- a/dist/publish-crates-eclipse-main.js +++ b/dist/publish-crates-eclipse-main.js @@ -128495,7 +128495,6 @@ function describe(path = process.cwd()) { - const build_crates_standalone_artifact = new artifact.DefaultArtifactClient(); function setup() { const repo = core.getInput("repo", { required: true }); @@ -128535,10 +128534,8 @@ async function main(input) { const { id } = await build_crates_standalone_artifact.uploadArtifact(output, [output], process.cwd()); core.setOutput("artifact-id", id); core.setOutput("artifact-name", output); - await cleanup(input); } catch (error) { - await cleanup(input); if (error instanceof Error) core.setFailed(error.message); } @@ -128547,12 +128544,6 @@ function artifactName(repo, version, target) { return `${repo}-${version}-${target}-standalone.zip`; } const artifactRegExp = /^.*-standalone\.zip$/; -async function cleanup(input) { - const repoName = input.repo.split("/").at(1); - const repoPath = process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : repoName; - core.info(`Deleting repository ${repoPath}`); - await fs.rm(repoPath, { recursive: true, force: true }); -} ;// CONCATENATED MODULE: ./src/publish-crates-eclipse.ts @@ -128594,15 +128585,15 @@ async function publish_crates_eclipse_main(input) { } } } - publish_crates_eclipse_cleanup(); + cleanup(); } catch (error) { - publish_crates_eclipse_cleanup(); + cleanup(); if (error instanceof Error) lib_core.setFailed(error.message); } } -function publish_crates_eclipse_cleanup() { +function cleanup() { command_sh(`rm -r *`); } diff --git a/dist/publish-crates-github-main.js b/dist/publish-crates-github-main.js index b0763e2..19a470c 100644 --- a/dist/publish-crates-github-main.js +++ b/dist/publish-crates-github-main.js @@ -128552,7 +128552,6 @@ function describe(path = process.cwd()) { - const build_crates_standalone_artifact = new artifact.DefaultArtifactClient(); function build_crates_standalone_setup() { const repo = core.getInput("repo", { required: true }); @@ -128592,10 +128591,8 @@ async function build_crates_standalone_main(input) { const { id } = await build_crates_standalone_artifact.uploadArtifact(output, [output], process.cwd()); core.setOutput("artifact-id", id); core.setOutput("artifact-name", output); - await build_crates_standalone_cleanup(input); } catch (error) { - await build_crates_standalone_cleanup(input); if (error instanceof Error) core.setFailed(error.message); } @@ -128604,12 +128601,6 @@ function build_crates_standalone_artifactName(repo, version, target) { return `${repo}-${version}-${target}-standalone.zip`; } const build_crates_standalone_artifactRegExp = /^.*-standalone\.zip$/; -async function build_crates_standalone_cleanup(input) { - const repoName = input.repo.split("/").at(1); - const repoPath = process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : repoName; - core.info(`Deleting repository ${repoPath}`); - await fs.rm(repoPath, { recursive: true, force: true }); -} ;// CONCATENATED MODULE: ./src/publish-crates-github.ts diff --git a/dist/publish-crates-homebrew-main.js b/dist/publish-crates-homebrew-main.js index 4346ede..a80ec64 100644 --- a/dist/publish-crates-homebrew-main.js +++ b/dist/publish-crates-homebrew-main.js @@ -128497,7 +128497,6 @@ function describe(path = process.cwd()) { - const build_crates_standalone_artifact = new artifact.DefaultArtifactClient(); function setup() { const repo = core.getInput("repo", { required: true }); @@ -128537,10 +128536,8 @@ async function main(input) { const { id } = await build_crates_standalone_artifact.uploadArtifact(output, [output], process.cwd()); core.setOutput("artifact-id", id); core.setOutput("artifact-name", output); - await cleanup(input); } catch (error) { - await cleanup(input); if (error instanceof Error) core.setFailed(error.message); } @@ -128549,12 +128546,6 @@ function artifactName(repo, version, target) { return `${repo}-${version}-${target}-standalone.zip`; } const artifactRegExp = /^.*-standalone\.zip$/; -async function cleanup(input) { - const repoName = input.repo.split("/").at(1); - const repoPath = process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : repoName; - core.info(`Deleting repository ${repoPath}`); - await fs.rm(repoPath, { recursive: true, force: true }); -} ;// CONCATENATED MODULE: ./src/publish-crates-homebrew.ts @@ -128647,15 +128638,15 @@ async function publish_crates_homebrew_main(input) { if (input.liveRun) { command_sh(`git push ${tapUrl}`, { cwd: tapPath }); } - publish_crates_homebrew_cleanup(input); + cleanup(input); } catch (error) { - publish_crates_homebrew_cleanup(input); + cleanup(input); if (error instanceof Error) lib_core.setFailed(error.message); } } -function publish_crates_homebrew_cleanup(input) { +function cleanup(input) { for (const formula of input.formulae) { command_sh(`brew uninstall --force --ignore-dependencies ${formula}`, { check: false }); } diff --git a/src/build-crates-standalone.ts b/src/build-crates-standalone.ts index 9946c34..28e9c97 100644 --- a/src/build-crates-standalone.ts +++ b/src/build-crates-standalone.ts @@ -1,4 +1,3 @@ -import * as fs from "fs/promises"; import * as path from "path"; import * as core from "@actions/core"; @@ -65,10 +64,7 @@ export async function main(input: Input) { const { id } = await artifact.uploadArtifact(output, [output], process.cwd()); core.setOutput("artifact-id", id); core.setOutput("artifact-name", output); - - await cleanup(input); } catch (error) { - await cleanup(input); if (error instanceof Error) core.setFailed(error.message); } } @@ -78,10 +74,3 @@ export function artifactName(repo: string, version: string, target: string): str } export const artifactRegExp: RegExp = /^.*-standalone\.zip$/; - -export async function cleanup(input: Input) { - const repoName = input.repo.split("/").at(1); - const repoPath = process.env["GITHUB_ACTIONS"] != undefined ? process.cwd() : repoName; - core.info(`Deleting repository ${repoPath}`); - await fs.rm(repoPath, { recursive: true, force: true }); -}