Skip to content
Closed
Changes from 1 commit
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
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,23 @@ async function run(octokit, context, token) {
stripHash: stripHash(getInput('strip-hash'))
});

const buildScript = getInput('build-script') || 'build';
const cwd = process.cwd();

let { packageManager, installScript } = await getPackageManagerAndInstallScript(cwd);
if (getInput('install-script')) {
installScript = getInput('install-script');
}

const buildScript = getInput('build-script') || `${packageManager} run build`;

startGroup(`[current] Install Dependencies`);
console.log(`Installing using ${installScript}`);
await exec(installScript);
endGroup();

startGroup(`[current] Build using ${packageManager}`);
console.log(`Building using ${packageManager} run ${buildScript}`);
await exec(`${packageManager} run ${buildScript}`);
console.log(`Building using ${buildScript}`);
await exec(buildScript);
Comment on lines -63 to +65

@rschristian rschristian Feb 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exec calls cannot be touched, this would be a breaking change.

#126 already made this change for v3, but for v2, we're left treating build-script as a script name, e.g., build, build:core, etc. Not a full command.

You can try to handle the console logs on their own if you want to though.

Needs to be updated here too:

startGroup(`[base] Build using ${packageManager}`);
await exec(`${packageManager} run ${buildScript}`);

Edit: Or apparently not, as we're missing a console.log there. Oops

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you're right! I didn't count for build-script being a script name :)

endGroup();

// In case the build step alters a JSON-file, ....
Expand Down