[X2Go-Commits] [buildscripts] 01/01: bin/{build-{deb, osx, rpm}-package, sbuild-deb-package, build-nsis-package.sh: allow checking out rebased branch without having to manually modify the repository beforehand.
git-admin at x2go.org
git-admin at x2go.org
Wed Feb 28 19:55:17 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit e46d3c7832f779205f25f4397c269eca00528bd2
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Feb 28 19:53:31 2018 +0100
bin/{build-{deb,osx,rpm}-package,sbuild-deb-package,build-nsis-package.sh: allow checking out rebased branch without having to manually modify the repository beforehand.
The release build branch is not always a fast-forward, sometimes its
history diverges when switching from one release branch to another.
---
bin/build-deb-package | 3 ++-
bin/build-nsis-package.sh | 3 ++-
bin/build-osx-package | 3 ++-
bin/build-rpm-package | 3 ++-
bin/sbuild-deb-package | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/bin/build-deb-package b/bin/build-deb-package
index 929bfd7..cee7443 100755
--- a/bin/build-deb-package
+++ b/bin/build-deb-package
@@ -137,7 +137,8 @@ prepare_workspace() {
cd "${PROJECT_DIR}" && {
git reset --hard
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
- git pull origin "${CHECKOUT}"
+ git fetch origin "${CHECKOUT}"
+ git reset --hard "origin/${CHECKOUT}"
git fetch origin upstream:upstream || true
git fetch origin pristine-tar:pristine-tar || true
# and again, get the ${CHECKOUT} refspec in pure state
diff --git a/bin/build-nsis-package.sh b/bin/build-nsis-package.sh
index f7adb88..f86caa7 100755
--- a/bin/build-nsis-package.sh
+++ b/bin/build-nsis-package.sh
@@ -120,7 +120,8 @@ prepare_workspace() {
if [ -d "${PROJECT_DIR}/.git" ]; then
cd "${PROJECT_DIR}" && git reset --hard
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
- git pull --force origin "${CHECKOUT}"
+ git fetch --force origin "${CHECKOUT}"
+ git reset --hard "origin/${CHECKOUT}"
git fetch origin upstream:upstream || true
git fetch origin pristine-tar:pristine-tar || true
# and again, get the ${CHECKOUT} refspec in pure state
diff --git a/bin/build-osx-package b/bin/build-osx-package
index c904f32..52a1be1 100755
--- a/bin/build-osx-package
+++ b/bin/build-osx-package
@@ -133,7 +133,8 @@ prepare_workspace() {
cd "${PROJECT_DIR}" && {
git reset --hard
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
- git pull origin "${CHECKOUT}"
+ git fetch origin "${CHECKOUT}"
+ git reset --hard "origin/${CHECKOUT}"
git fetch origin upstream:upstream || true
git fetch origin pristine-tar:pristine-tar || true
# and again, get the ${CHECKOUT} refspec in pure state
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 99d2a12..ea0cfd7 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -752,7 +752,8 @@ prepare_workspace() {
cd "${PROJECT_DIR}" && {
git reset --hard
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
- git pull origin "${CHECKOUT}"
+ git fetch origin "${CHECKOUT}"
+ git reset --hard "origin/${CHECKOUT}"
git fetch origin upstream:upstream || true
git fetch origin pristine-tar:pristine-tar || true
# and again, get the ${CHECKOUT} refspec in pure state
diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package
index 7f0530b..952ffe7 100755
--- a/bin/sbuild-deb-package
+++ b/bin/sbuild-deb-package
@@ -175,7 +175,8 @@ prepare_workspace() {
cd "${PROJECT_DIR}" && {
git reset --hard
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
- git pull origin "${CHECKOUT}"
+ git fetch origin "${CHECKOUT}"
+ git reset --hard "origin/${CHECKOUT}"
git fetch origin upstream:upstream || true
git fetch origin pristine-tar:pristine-tar || true
# and again, get the ${CHECKOUT} refspec in pure state
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list