Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143889,7 +143889,6 @@ const manifestKey = core.getInput("manifest");
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
const compilerVersion = core.getInput("ocaml-compiler-version");
const staticCompilerVersion = core.getInput("ocaml-static-compiler-version");
const customPostInstallJS = core.getInput("postinstall-js");
const setupEsy = core.getInput("setup-esy") || true; // Default behaviour is to install esy for user and cache it
const setupEsyTarball = core.getInput("setup-esy-tarball");
Expand Down Expand Up @@ -144106,9 +144105,6 @@ function prepareNPMArtifacts() {
if (!compilerVersion) {
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-compiler-version` field to be set in github actions");
}
if (!staticCompilerVersion) {
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions");
}
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
try {
const manifestFilePath = JSON.parse(external_child_process_.execSync(statusCmd, { cwd: workingDirectory }).toString()).rootPackageConfigPath;
Expand Down Expand Up @@ -144157,9 +144153,6 @@ function bundleNPMArtifacts() {
if (!compilerVersion) {
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-compiler-version` field to be set in github actions");
}
if (!staticCompilerVersion) {
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions");
}
external_fs_.statSync(workingDirectory);
process.chdir(workingDirectory);
const releaseFolder = external_path_.join(workingDirectory, "_npm-release");
Expand Down Expand Up @@ -144214,7 +144207,7 @@ function bundleNPMArtifacts() {
repository: mainPackageJson.repository,
scripts: {
postinstall: rewritePrefix
? `node -e \"process.env['OCAML_VERSION'] = process.platform == 'linux' ? '${staticCompilerVersion}': '${compilerVersion}'; process.env['OCAML_PKG_NAME'] = 'ocaml'; process.env['ESY_RELEASE_REWRITE_PREFIX']=true; require('./postinstall.js')\"`
? `node -e \"process.env['OCAML_VERSION'] = '${compilerVersion}'; process.env['OCAML_PKG_NAME'] = 'ocaml'; process.env['ESY_RELEASE_REWRITE_PREFIX']=true; require('./postinstall.js')\"`
: "node ./postinstall.js",
},
bin: bins,
Expand Down
14 changes: 1 addition & 13 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const manifestKey = core.getInput("manifest");
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
const compilerVersion = core.getInput("ocaml-compiler-version");
const staticCompilerVersion = core.getInput("ocaml-static-compiler-version");
const customPostInstallJS = core.getInput("postinstall-js");
const setupEsy = core.getInput("setup-esy") || true; // Default behaviour is to install esy for user and cache it
const setupEsyTarball = core.getInput("setup-esy-tarball");
Expand Down Expand Up @@ -305,11 +304,6 @@ async function prepareNPMArtifacts() {
);
}

if (!staticCompilerVersion) {
throw new Error(
"Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions"
);
}
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
try {
const manifestFilePath = JSON.parse(
Expand Down Expand Up @@ -368,12 +362,6 @@ async function bundleNPMArtifacts() {
);
}

if (!staticCompilerVersion) {
throw new Error(
"Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions"
);
}

fs.statSync(workingDirectory);
process.chdir(workingDirectory);
const releaseFolder = path.join(workingDirectory, "_npm-release");
Expand Down Expand Up @@ -448,7 +436,7 @@ async function bundleNPMArtifacts() {
repository: mainPackageJson.repository,
scripts: {
postinstall: rewritePrefix
? `node -e \"process.env['OCAML_VERSION'] = process.platform == 'linux' ? '${staticCompilerVersion}': '${compilerVersion}'; process.env['OCAML_PKG_NAME'] = 'ocaml'; process.env['ESY_RELEASE_REWRITE_PREFIX']=true; require('./postinstall.js')\"`
? `node -e \"process.env['OCAML_VERSION'] = '${compilerVersion}'; process.env['OCAML_PKG_NAME'] = 'ocaml'; process.env['ESY_RELEASE_REWRITE_PREFIX']=true; require('./postinstall.js')\"`
: "node ./postinstall.js",
},
bin: bins,
Expand Down
Loading