forked from scratchfoundation/scratch-vm
-
-
Notifications
You must be signed in to change notification settings - Fork 2
merge_scratch vm_develop
Kouji Takao edited this page Jun 29, 2025
·
9 revisions
アップストリーム( https://github.com/scratchfoundation/scratch-vm.git )のdevelopブランチをマージする手順を説明します。
おおむね2週間に1回程度行うといいでしょう。
初めてマージ作業をする場合は以下のコマンドを実行して下さい。
$ git remote add upstream https://github.com/scratchfoundation/scratch-vm.git
以下のコマンドで、設定を確認することができます。下の2行が表示されていればOKです。
$ git remote -v
origin https://github.com/smalruby/scratch-vm.git (fetch)
origin https://github.com/smalruby/scratch-vm.git (push)
upstream https://github.com/scratchfoundation/scratch-vm.git (fetch)
upstream https://github.com/scratchfoundation/scratch-vm.git (push)
$ git checkout develop
$ git pull --rebase
$ git fetch -p upstream
$ git merge upstream/develop
ここで、コンフリクトが発生するので解消します。
- package-lock.json
- このファイルそのものは修正しない。packages.json を修正後、 npm install でコンフリクトを解消できる
- このとき npm ci はできない。packages.json が不正なフォーマットであるため。
- .github/workflows/update-i18n.yml
- 削除する
コンフリクトが解消できたら、 smalruby3-gui を使って動作を確認します。最低限のチェックでOKですので、少し触ってみてエラーがでなければマージします (これまで問題になったことがないため)。
(smalruby3-develop の場合は docker compose run --rm gui bash を実行してから、以下のコマンドを実行する)
$ cd path/to/scratch-vm
$ npm install && npm run build && npm link
$ cd path/to/smalruby3-gui
$ npm install && npm link scratch-vm
$ npm start
以上でマージ作業は完了です。
修正内容をGitHubにpushしてPRを作ります。
$ git checkout -b merge/upstream
$ git add .
$ git commit -m "feat: merged upstream `git log --pretty=format:"%h" -n 1 upstream/develop`"
$ git push origin merge/upstream
https://github.com/<ユーザ名>/scratch-vmにアクセスして、https://github.com/smalruby/scratch-vm の develop ブランチへのPRを作成する。ここで間違って LLK/scratch-gui にPRを作成しないこと。
- タイトル:
feat: merged upstream %upstreamの最終コミットID%
- コミットログのまま
- 内容: 空でOK。もしコンフリクトを解消するときに重要な修正をした場合は記述すること。
slack ( https://smalruby3.slack.com/messages/CAAA9Q9EJ/ )で @kouji に マージ依頼: <PRのURL>
を送る。
随時追記予定。
マージ後は、 smalruby3-gui の scratch-vm のバージョンを上げてコミットする必要があります。
$ cd /path/to/smalruby3-gui
$ npm update scratch-vm
$ git add .
$ git commit -m "feat: bump up scratch-vm"