Skip to content

Commit

Permalink
chore: sophisticate the moc bumper (#280)
Browse files Browse the repository at this point in the history
This is now an almost "one-click" operation :-)
  • Loading branch information
ggreif authored Jan 30, 2025
1 parent e7c7a77 commit cb8ddd8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions script/bump-moc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@ MOC_VERSION=$1
echo upgrading '`moc`' to $MOC_VERSION
echo

git switch main && git pull

perl -pi -e "s/MOC_VERSION = \"[0-9\.]+\"/MOC_VERSION = \"$MOC_VERSION\"/g" src/App.tsx

echo '`public/moc.js`' before
ls -l public/moc.js
curl -L https://github.com/dfinity/motoko/releases/download/${MOC_VERSION}/moc-${MOC_VERSION}.js \
> public/moc.js
echo '`public/moc.js`' after bump
ls -l public/moc.js

git add src/App.tsx public/moc.js
git switch -c bump/moc-$MOC_VERSION
git status -uno
git diff --staged src/App.tsx
git commit -m 'chore: bump `moc` to v'$MOC_VERSION
git push -u origin bump/moc-$MOC_VERSION
echo Create PR by
echo 'open https://github.com/dfinity/motoko-playground/pull/new/bump/moc-'$MOC_VERSION

0 comments on commit cb8ddd8

Please sign in to comment.