I wanted this to be written down in a place where all who contribute can find it when they need it. CMB has a master and a release branch, and each has a submodule that tracks its respective SMTK branch. The right way to simultaneously bump CMB’s SMTK on both release and master is as follows:
-
Create a branch off of CMB master
$ git checkout master
$ git checkout -b update-smtk-to-latest-master
-
Update SMTK to the latest master
$ cd <src>/thirdparty/smtk
$ git checkout master
$ git pull
$ cd ..
$ git add .
$ git commit -m "Update smtk to latest master"
-
Create a branch off of CMB release
$ git checkout release
$ git checkout -b update-smtk-to-latest-release
-
Update SMTK to the latest release
$ cd <src>/thirdparty/smtk
$ git checkout release
$ git pull
$ cd ..
$ git add .
$ git commit -m "Update smtk to latest release"
-
Merge the release branch into the master branch (so the master branch has the right history)
$ git checkout update-smtk-to-latest-master
$ git merge -s ours update-smtk-to-latest-release
-
Submit a merge request with the appropriate backport command
$ git push <personal_repo>
In the merge request’s description:
Backport: release:HEAD^2
-
Test both release and master branches
Do: test --merged