Skip to content

Commit 3935d85

Browse files
committed
♻️ - Improve release script
1 parent fb29aac commit 3935d85

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

release.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,22 @@ if [ $(git rev-parse --abbrev-ref HEAD) != "master" ]; then
1313
fi
1414

1515
# update the version in package.json
16-
npm version $1
16+
sed -i '' -e "s/\"version\": \".*\"/\"version\": \"$1\"/" package.json
17+
1718

1819
# update the version in cargo.toml
1920
sed -i '' -e "s/^version = \".*\"/version = \"$1\"/" Cargo.toml
21+
cargo build
2022

2123
# commit the changes with the version
22-
git add Cargo.toml package.json
23-
git commit -m "Release $1"
24+
git add Cargo.toml package.json Cargo.lock
25+
git commit -m "Release v$1"
2426

2527
# tag current commit with the first argument
26-
git tag -a $1 -m "Release $1"
28+
git tag -a v$1 -m "Release v$1"
2729

2830
# push the changes
2931
git push origin master
3032

3133
# push the tag
32-
git push origin $1
34+
git push origin v$1

0 commit comments

Comments
 (0)