Skip to content

Commit 02c618b

Browse files
committed
Fix publish script
1 parent 252078a commit 02c618b

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

β€Žscripts/publish-pkg.shβ€Ž

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
set -euo pipefail
1+
#!/bin/sh
2+
set -eu
23

4+
echo "πŸ” Checking branch..."
35
# check if main branch is the current branch
46
if [ "$(git branch --show-current)" != "main" ]; then
5-
echo "Error: not on main branch"
7+
echo "❌ Error: not on main branch"
68
exit 1
79
fi
10+
echo "βœ“ On main branch"
811

12+
echo "πŸ” Checking working tree..."
913
# check if main branch is clean
1014
if ! git diff-index --quiet HEAD --; then
11-
echo "Error: main branch is not clean"
15+
echo "❌ Error: main branch is not clean"
1216
exit 1
1317
fi
18+
echo "βœ“ Working tree is clean"
1419

20+
echo ""
21+
echo "πŸ“¦ Bumping version..."
1522
pnpm version patch -m "chore(release): v%s [skip ci]"
1623

24+
echo ""
25+
echo "πŸš€ Publishing to npm..."
1726
pnpm publish --no-git-checks
1827

28+
echo ""
29+
echo "πŸ“€ Pushing to origin..."
1930
git push origin HEAD:main --follow-tags
31+
32+
echo ""
33+
echo "βœ… Done!"

0 commit comments

Comments
Β (0)