Skip to content

Commit d60e742

Browse files
authored
Merge pull request #42 from esy/prometheansacrifice/optional-ocaml-static-compiler-version
Removes static compiler version field
2 parents 671e861 + c828d07 commit d60e742

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

dist/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143889,7 +143889,6 @@ const manifestKey = core.getInput("manifest");
143889143889
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
143890143890
const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
143891143891
const compilerVersion = core.getInput("ocaml-compiler-version");
143892-
const staticCompilerVersion = core.getInput("ocaml-static-compiler-version");
143893143892
const customPostInstallJS = core.getInput("postinstall-js");
143894143893
const setupEsy = core.getInput("setup-esy") || true; // Default behaviour is to install esy for user and cache it
143895143894
const setupEsyTarball = core.getInput("setup-esy-tarball");
@@ -144106,9 +144105,6 @@ function prepareNPMArtifacts() {
144106144105
if (!compilerVersion) {
144107144106
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-compiler-version` field to be set in github actions");
144108144107
}
144109-
if (!staticCompilerVersion) {
144110-
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions");
144111-
}
144112144108
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
144113144109
try {
144114144110
const manifestFilePath = JSON.parse(external_child_process_.execSync(statusCmd, { cwd: workingDirectory }).toString()).rootPackageConfigPath;
@@ -144157,9 +144153,6 @@ function bundleNPMArtifacts() {
144157144153
if (!compilerVersion) {
144158144154
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-compiler-version` field to be set in github actions");
144159144155
}
144160-
if (!staticCompilerVersion) {
144161-
throw new Error("Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions");
144162-
}
144163144156
external_fs_.statSync(workingDirectory);
144164144157
process.chdir(workingDirectory);
144165144158
const releaseFolder = external_path_.join(workingDirectory, "_npm-release");
@@ -144214,7 +144207,7 @@ function bundleNPMArtifacts() {
144214144207
repository: mainPackageJson.repository,
144215144208
scripts: {
144216144209
postinstall: rewritePrefix
144217-
? `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')\"`
144210+
? `node -e \"process.env['OCAML_VERSION'] = '${compilerVersion}'; process.env['OCAML_PKG_NAME'] = 'ocaml'; process.env['ESY_RELEASE_REWRITE_PREFIX']=true; require('./postinstall.js')\"`
144218144211
: "node ./postinstall.js",
144219144212
},
144220144213
bin: bins,

index.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const manifestKey = core.getInput("manifest");
3535
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
3636
const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
3737
const compilerVersion = core.getInput("ocaml-compiler-version");
38-
const staticCompilerVersion = core.getInput("ocaml-static-compiler-version");
3938
const customPostInstallJS = core.getInput("postinstall-js");
4039
const setupEsy = core.getInput("setup-esy") || true; // Default behaviour is to install esy for user and cache it
4140
const setupEsyTarball = core.getInput("setup-esy-tarball");
@@ -305,11 +304,6 @@ async function prepareNPMArtifacts() {
305304
);
306305
}
307306

308-
if (!staticCompilerVersion) {
309-
throw new Error(
310-
"Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions"
311-
);
312-
}
313307
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
314308
try {
315309
const manifestFilePath = JSON.parse(
@@ -368,12 +362,6 @@ async function bundleNPMArtifacts() {
368362
);
369363
}
370364

371-
if (!staticCompilerVersion) {
372-
throw new Error(
373-
"Prepare bundle-npm-artifacts needs `ocaml-static-compiler-version` field to be set in github actions"
374-
);
375-
}
376-
377365
fs.statSync(workingDirectory);
378366
process.chdir(workingDirectory);
379367
const releaseFolder = path.join(workingDirectory, "_npm-release");
@@ -448,7 +436,7 @@ async function bundleNPMArtifacts() {
448436
repository: mainPackageJson.repository,
449437
scripts: {
450438
postinstall: rewritePrefix
451-
? `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')\"`
439+
? `node -e \"process.env['OCAML_VERSION'] = '${compilerVersion}'; process.env['OCAML_PKG_NAME'] = 'ocaml'; process.env['ESY_RELEASE_REWRITE_PREFIX']=true; require('./postinstall.js')\"`
452440
: "node ./postinstall.js",
453441
},
454442
bin: bins,

0 commit comments

Comments
 (0)