File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -769,6 +769,24 @@ 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" i.e. when
776
+ # the "os-upgrade" branch is marked active in dlpx-version-mapping. Not all product repositories
777
+ # require an "os-upgrade" branch, because some packages will successfully build on the new
778
+ # Ubuntu version as well as the old without any changes.
779
+ # To allow engineering to create the "os-upgrade" branch only in repositories that require
780
+ # changes, this block of code will check if the "os-upgrade" branch exists in the repository
781
+ # and if it does not, it will use the "develop" branch instead.
782
+ #
783
+ if [[ " $PACKAGE_GIT_BRANCH " == " os-upgrade" ]]; then
784
+ if [[ -n $( git ls-remote --exit-code --heads origin refs/heads/os-upgrade) ]]; then
785
+ echo " NOTE: The branch 'os-upgrade' does not exist for this repo. Using 'develop' instead."
786
+ PACKAGE_GIT_BRANCH=" develop"
787
+ fi
788
+ fi
789
+
772
790
logmust git_fetch_helper " $PACKAGE_GIT_URL " --no-tags \
773
791
" +$PACKAGE_GIT_BRANCH :repo-HEAD" --depth=1
774
792
logmust git show-ref repo-HEAD
You can’t perform that action at this time.
0 commit comments