Skip to content

Commit

Permalink
Default to the node process's version for building
Browse files Browse the repository at this point in the history
  • Loading branch information
Bedrockbreaker committed Dec 14, 2024
1 parent 8a1155c commit efea771
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "partypooper",
"version": "0.2.1",
"version": "0.2.2",
"type": "module",
"description": "Modding Utility for Party Project",
"main": "./src/main.ts",
"scripts": {
"clean": "node --experimental-strip-types ./tools/clean.ts",
"full-clean": "node --experimental-strip-types ./tools/clean.ts --clean-cache",
"build": "node --experimental-strip-types ./tools/build.ts linux-x64 win-x64 --node-version 22.9.0",
"build": "node --experimental-strip-types ./tools/build.ts linux-x64 win-x64",
"build-debug": "node --experimental-strip-types ./tools/build.ts --debug"
},
"author": "Bedrockbreaker",
Expand Down
4 changes: 2 additions & 2 deletions tools/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async function getNode(target: string, targetNodeVersion: string) {
program
.description("builds the project")
.argument("[targets...]", "Platform(s) to build for, e.g. 'linux-x64' or 'win-arm64'")
.option("--node-version <version>", "Node version to build for")
.option("--node-version <version>", "Node version to build for", process.version.slice(1))
.option("--debug", "Build in debug mode", false)
.action(async (targets, {nodeVersion: targetNodeVersion, debug: isDebug}) => {
build(isDebug);
Expand All @@ -114,7 +114,7 @@ program

for (const target of targets) {
const executablePath = await getNode(target, targetNodeVersion);
const distExecutable = join("./dist", `PartyPooper${target.includes("win") ? ".exe" : ""}`);
const distExecutable = join("./dist", `PartyPooper-${target}${target.includes("win") ? ".exe" : ""}`);
copyFileSync(executablePath, distExecutable);

console.log(`Injecting: ${distExecutable}`);
Expand Down

0 comments on commit efea771

Please sign in to comment.