Skip to content

Commit 9044798

Browse files
authored
chore/cleanup (#7)
* chore: comment * chore: useless code
1 parent e411474 commit 9044798

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@
2323
"prettier": "^3.6.2",
2424
"typescript": "^5.9.2",
2525
"typescript-eslint": "^8.39.1"
26-
},
27-
"publishConfig": {
28-
"access": "public"
2926
}
3027
}

scripts/release.cjs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@ async function main() {
1010

1111
const { exitCode, stderr } = await getExecOutput(
1212
`git`,
13-
["ls-remote", "--exit-code", "origin", "--tags", `refs/tags/${tag}`],
13+
[
14+
"ls-remote",
15+
/**
16+
* Exit with status "2" when no matching refs are found in the remote repository.
17+
* Usually the command exits with status "0" to indicate it successfully talked with the remote repository,
18+
* whether it found any matching refs.
19+
*
20+
* @see https://git-scm.com/docs/git-ls-remote#Documentation/git-ls-remote.txt---exit-code
21+
*/
22+
"--exit-code",
23+
"origin",
24+
"--tags",
25+
`refs/tags/${tag}`,
26+
],
1427
{ ignoreReturnCode: true }
1528
);
1629
if (exitCode === 0) {
1730
console.log(`Action is not being published because version ${tag} is already published`);
1831
return;
1932
}
20-
/**
21-
* Exit with status "2" when no matching refs are found in the remote repository.
22-
* @see https://git-scm.com/docs/git-ls-remote#Documentation/git-ls-remote.txt---exit-code
23-
*/
2433
if (exitCode !== 2) {
2534
throw new Error(`git ls-remote exited with ${exitCode.toString()}:\n${stderr}`);
2635
}

0 commit comments

Comments
 (0)