File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ inputs:
24
24
bundle-npm-artifacts-mode :
25
25
description : Runs a steps that bundle artifacts for release the app to NPM.
26
26
required : false
27
+ postinstall-js :
28
+ description : Path to a postinstall.js file that would be run by NPM
29
+ required : false
27
30
runs :
28
31
using : node20
29
32
main : dist/index.js
Original file line number Diff line number Diff line change @@ -175235,6 +175235,7 @@ const sourceCacheKey = core.getInput("source-cache-key");
175235
175235
const manifestKey = core.getInput("manifest");
175236
175236
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
175237
175237
const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
175238
+ const customPostInstallJS = core.getInput("postinstall-js");
175238
175239
function run(name, command, args) {
175239
175240
return __awaiter(this, void 0, void 0, function* () {
175240
175241
const PATH = process.env.PATH ? process.env.PATH : "";
@@ -175444,8 +175445,9 @@ function bundleNPMArtifacts() {
175444
175445
catch (_a) {
175445
175446
console.warn("No LICENSE found");
175446
175447
}
175447
- console.log("Copying postinstall.js");
175448
- external_fs_.copyFileSync(__nccwpck_require__.ab + "release-postinstall.js", external_path_.join(releaseFolder, "postinstall.js"));
175448
+ const releasePostInstallJS = customPostInstallJS !== null && customPostInstallJS !== void 0 ? customPostInstallJS : __nccwpck_require__.ab + "release-postinstall.js";
175449
+ console.log("Copying postinstall.js from", releasePostInstallJS);
175450
+ external_fs_.copyFileSync(releasePostInstallJS, external_path_.join(releaseFolder, "postinstall.js"));
175449
175451
console.log("Creating placeholder files");
175450
175452
const placeholderFile = `:; echo "You need to have postinstall enabled"; exit $?
175451
175453
@ECHO OFF
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const sourceCacheKey = core.getInput("source-cache-key");
16
16
const manifestKey = core . getInput ( "manifest" ) ;
17
17
const prepareNPMArtifactsMode = core . getInput ( "prepare-npm-artifacts-mode" ) ;
18
18
const bundleNPMArtifactsMode = core . getInput ( "bundle-npm-artifacts-mode" ) ;
19
+ const customPostInstallJS = core . getInput ( "postinstall-js" ) ;
19
20
20
21
async function run ( name : string , command : string , args : string [ ] ) {
21
22
const PATH = process . env . PATH ? process . env . PATH : "" ;
@@ -287,9 +288,11 @@ async function bundleNPMArtifacts() {
287
288
console . warn ( "No LICENSE found" ) ;
288
289
}
289
290
290
- console . log ( "Copying postinstall.js" ) ;
291
+ const releasePostInstallJS =
292
+ customPostInstallJS ?? path . join ( __dirname , "release-postinstall.js" ) ;
293
+ console . log ( "Copying postinstall.js from" , releasePostInstallJS ) ;
291
294
fs . copyFileSync (
292
- path . join ( __dirname , "release-postinstall.js" ) ,
295
+ releasePostInstallJS ,
293
296
path . join ( releaseFolder , "postinstall.js" )
294
297
) ;
295
298
You can’t perform that action at this time.
0 commit comments