Skip to content

Commit

Permalink
add script pump-version
Browse files Browse the repository at this point in the history
Signed-off-by: James Ng <[email protected]>
  • Loading branch information
0xj4m35 committed Nov 27, 2024
1 parent 649469f commit e3732a5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/pump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

set -euo pipefail

version=$1

echo "update version field"
jq ".version = \"$version\"" <package.json >package.json.tmp
mv package.json.tmp package.json

echo "build"
npm run build

echo "publish"
npm publish

echo "commit new version"
git add package.json
git commit -m "publish version v$version"

echo "tag version"
git tag v"$version"

echo "push to remote"
git push origin main
git push origin v"$version"

0 comments on commit e3732a5

Please sign in to comment.