-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor postinstall script for consistency and readability; update f…
…ormatting in workflow and README
- Loading branch information
1 parent
f517e2e
commit 34835a5
Showing
3 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
const { execSync } = require('node:child_process'); | ||
const os = require('node:os'); | ||
const { execSync } = require("node:child_process"); | ||
const os = require("node:os"); | ||
|
||
const platform = os.platform(); | ||
const distPath = 'dist/cli.js'; | ||
const distPath = "dist/cli.js"; | ||
|
||
console.log('Building the project...'); | ||
execSync('bun run build'); | ||
console.log('Build completed'); | ||
console.log("Building the project..."); | ||
execSync("bun run build"); | ||
console.log("Build completed"); | ||
|
||
if (platform === 'linux' || platform === 'darwin') { | ||
if (platform === "linux" || platform === "darwin") { | ||
execSync(`chmod +x ${distPath}`); | ||
console.log('Set executable permissions for dist/cli.js'); | ||
} else if (platform === 'win32') { | ||
console.log('Windows detected, no need to set executable permissions'); | ||
console.log("Set executable permissions for dist/cli.js"); | ||
} else if (platform === "win32") { | ||
console.log("Windows detected, no need to set executable permissions"); | ||
} else { | ||
console.log('Unknown platform, no changes made'); | ||
} | ||
console.log("Unknown platform, no changes made"); | ||
} |