-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust release scripts to work with scripts as monorepo #141
Conversation
60804bd
to
f39d78b
Compare
A problem is that for the next round of releases we would have to run it manually twice, one from the old release tag to the last commit ID before the switchover, then for the new commit ID after the switchover to the release tag. Or we could run hardcode the commit IDs from before and after the switch and handle this case explicitly by running the |
New alternative, wait for the next round of releases to happen for all channels. |
This is implemented now. |
git -C "${REPOPATH}" difftool --no-prompt --extcmd='sh -c "cat \"$REMOTE\"" --' "${OLDREF}..${NEWREF}" -- "changelog/${section}/" | sort || { echo "Error: git difftool failed" ; exit 1 ; } | ||
|
||
# The assumption is that the old ref is really older, so we can assume that old would have submodules while new doesn't have them anymore | ||
if [ "${OLDREPOPATH}" != "${NEWREPOPATH}" ] && [ "${NEWREPOPATH}" = "scripts" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this handling will actually be needed, because we plan the next releases to use the submodules for both old and new releases, then we switch to merged scripts by retagging the newest release. So after that we are going to have both old and new release using merged scripts.
Also, I'm thinking that with merged scripts repos, we will abandon the changelog directories in sdk_container/src/third_party/<repo>
in favor of using the toplevel one, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to be able to diff releases instead of having a had break.
Yes, future entries can directly go to /changelog/
in scripts but the old ones should stay there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this also is an alternative to doing the retag, which I think it more elegant - specially when there are follow-up fixes needed to get the build working and other changes also start to slip in.
The change prepared in flatcar/scripts#699 means that we don't use the coreos-overlay/portage-stable repos anymore. Skip these repositories and the submodule handling, too. Leave existing logic there to support doing releases the old way (at least for the nearer future).
The change prepared in flatcar/scripts#699 means that we don't use the coreos-overlay/portage-stable repos anymore.
Skip these repositories and the submodule handling, too. Leave existing logic there to support doing releases the old way (at least for the nearer future).
How to use
Merge before trying to do a release. Also required for proper output in the image-changes job.
Testing done
./mirror-repos-branch t-lo/merge-submodules-to-paths kai/t-lo/merge-submodules-to-paths
SCRIPTS_REF=origin/kai/t-lo/merge-submodules-to-paths SDK_VERSION=1.2.3 VERSION=1.2.3 CHANNEL=main ./tag-release
(see diff needed below)flatcar-build-scripts/show-changes origin/t-lo/merge-submodules-to-paths main-1.2.3
,FETCH=0 flatcar-build-scripts/show-changes alpha-3549.0.0 main-1.2.3
, andFETCH=0 flatcar-build-scripts/show-changes beta-3510.1.0 alpha-3549.0.0
(to test for regressions)Local test diff for
tag-release
was