File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -769,6 +769,23 @@ function fetch_repo_from_git() {
769
769
logmust git show-ref repo-HEAD
770
770
logmust git show-ref upstream-HEAD
771
771
else
772
+
773
+ #
774
+ # The "os-upgrade" branch is used for Ubuntu version upgrade projects. As such, the following
775
+ # block of code will only be executed if the `PACKAGE_GIT_BRANCH` is set to "os-upgrade". Not
776
+ # all product repositories are required to have an "os-upgrade" branch, because some packages
777
+ # will successfully build on the new Ubuntu version as well as the old without any changes.
778
+ # To allow engineering to create the "os-upgrade" branch only in repositories that require
779
+ # changes for the new Ubuntu version, this block of code will check if the "os-upgrade" branch
780
+ # exists in the repository and if it does not, it will build off of "develop" instead.
781
+ #
782
+ if [[ " $PACKAGE_GIT_BRANCH " == " os-upgrade" ]]; then
783
+ if [[ -n $( git_fetch_helper " $PACKAGE_GIT_URL " --no-tags " $PACKAGE_GIT_BRANCH " --depth=1) ]]; then
784
+ echo " NOTE: The branch 'os-upgrade' does not exist for this repo. Using 'develop' instead."
785
+ PACKAGE_GIT_BRANCH=" develop"
786
+ fi
787
+ fi
788
+
772
789
logmust git_fetch_helper " $PACKAGE_GIT_URL " --no-tags \
773
790
" +$PACKAGE_GIT_BRANCH :repo-HEAD" --depth=1
774
791
logmust git show-ref repo-HEAD
You can’t perform that action at this time.
0 commit comments