mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 21:30:16 +01:00
build-from-source: also fetch refs for pull requests when building
When somebody creates a pull request against NetworkManager's github repository, the github repository itself usually doesn't have a branch that references the pull request. Hence, the commit will not be fetched by default and checking out the commit will fail. Also add and fetch the refs for the pull request.
This commit is contained in:
parent
01c880540b
commit
2f67ac9eaf
1 changed files with 8 additions and 1 deletions
|
|
@ -81,7 +81,14 @@ if ! timeout 10m git clone "$BUILD_REPO"; then
|
|||
fi
|
||||
|
||||
cd "./NetworkManager/"
|
||||
git checkout "$BUILD_ID"
|
||||
|
||||
# if we fetch from a github repository, we also care about the refs to the pull-requests
|
||||
# fetch them too.
|
||||
git config --add remote.origin.fetch '+refs/tags/*:refs/nmbuild-origin/tags/*'
|
||||
git config --add remote.origin.fetch '+refs/pull/*:refs/nmbuild-origin/pull/*'
|
||||
git fetch origin
|
||||
|
||||
git checkout -B nmbuild "$BUILD_ID"
|
||||
echo "HEAD is $(git rev-parse HEAD)"
|
||||
|
||||
if [[ "$DO_TEST_BUILD" == yes ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue