diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-20 16:25:45 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-20 16:26:53 +0200 |
commit | 5590a301190b16a73318342abdbc58afd32cca66 (patch) | |
tree | e8eb1a1990e9cf27f9ba2004d95e587fbb265e83 | |
parent | e9360f6250a118ae1b890d81c715bf023b4798ab (diff) | |
download | buildscripts-5590a301190b16a73318342abdbc58afd32cca66.tar.gz buildscripts-5590a301190b16a73318342abdbc58afd32cca66.tar.bz2 buildscripts-5590a301190b16a73318342abdbc58afd32cca66.zip |
sbuild-deb-package: Make sure that a certain Git branch that we want to build from is obtained from origin.
-rwxr-xr-x | bin/sbuild-deb-package | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 0154b39..bfc41bc 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -136,6 +136,7 @@ prepare_workspace() { if [ ! -d ${PROJECT}/.git ]; then git clone --no-hardlinks --no-local "${GIT_TRANSPORT}://${GIT_HOSTNAME}/${PROJECT_PATH}.git" cd "${PROJECT}" + git fetch origin "${CHECKOUT}" || true git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" |