Skip to content

Commit cef1179

Browse files
committed
chore: setup build scripts
1 parent 08b5541 commit cef1179

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
"cli"
2525
],
2626
"scripts": {
27-
"build": "tsup"
27+
"clean": "rimraf dist",
28+
"prebuild": "npm run clean",
29+
"build": "tsup",
30+
"preversion": "npm run build",
31+
"postversion": "git push --tags"
2832
},
2933
"author": "Riki Phukon",
3034
"license": "MIT",
@@ -39,6 +43,7 @@
3943
"devDependencies": {
4044
"@types/debug": "^4.1.12",
4145
"@types/node": "^20.11.30",
46+
"rimraf": "^5.0.5",
4247
"tsup": "^8.0.2",
4348
"typescript": "^5.4.3"
4449
}

pnpm-lock.yaml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/setGitConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function setGitConfig(gpgAgentAddress: string[]): Promise<void> {
2929
user.signingkey = ${keyID}
3030
commit.gpgsign = true
3131
tag.gpgsign = true
32-
gpg.program = ${gpgAgentAddress}
32+
gpg.program = ${gpgAgentAddress.join('')}
3333
`;
3434

3535
console.log(boxen(content, { padding: 1, borderStyle: "round", borderColor: "blue" }));
@@ -47,7 +47,7 @@ export async function setGitConfig(gpgAgentAddress: string[]): Promise<void> {
4747
execSync(`git config --global user.signingkey ${keyID}`);
4848
execSync("git config --global commit.gpgsign true");
4949
execSync("git config --global tag.gpgsign true");
50-
execSync(`git config --global gpg.program "${gpgAgentAddress}"`);
50+
execSync(`git config --global gpg.program "${gpgAgentAddress.join('')}"`);
5151

5252
logger.blue("Git configurations set successfully");
5353
} catch (error: any) {

0 commit comments

Comments
 (0)