Skip to content

Commit

Permalink
chore: script for bumping moc (#278)
Browse files Browse the repository at this point in the history
## usage: `bash script/bump-moc.sh 0.13.6`

This is very basic for now, we can get fancier as we use it, e.g.
- at start: `git switch main && git pull`
- `git switch -c bump/moc-$MOC_VERSION`
- git commit -m 'chore: bump `moc` to v'$MOC_VERSION
- push it: `git push -u origin bump/moc-$MOC_VERSION`
- make the PR: `open https://github.com/dfinity/motoko-playground/pull/new/bump/moc-$MOC_VERSION`
  • Loading branch information
ggreif authored Jan 30, 2025
1 parent a007322 commit c610a1d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions script/bump-moc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

MOC_VERSION=$1

echo upgrading '`moc`' to $MOC_VERSION
echo

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

curl -L https://github.com/dfinity/motoko/releases/download/${MOC_VERSION}/moc-${MOC_VERSION}.js \
> public/moc.js

git add src/App.tsx public/moc.js
git status -uno
git diff --staged src/App.tsx

0 comments on commit c610a1d

Please sign in to comment.