[X2Go-Commits] [buildscripts] 01/01: bin/sbuild-deb-package: fetch upstream branch before creating an archive.

git-admin at x2go.org git-admin at x2go.org
Sat Jun 30 23:28:50 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit 5efbf67c369012e832fb223f4f2a632f55ad11b4
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Jun 30 23:28:47 2018 +0200

    bin/sbuild-deb-package: fetch upstream branch before creating an archive.
---
 bin/sbuild-deb-package | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package
index 999f365..0235112 100755
--- a/bin/sbuild-deb-package
+++ b/bin/sbuild-deb-package
@@ -341,6 +341,11 @@ build_packages() {
 					#                                                                                    ┌ remove epoch  ┌ remove debian rev ┌ replace tilde characters with underscores
 					UPSTREAM_VERSION="$(dpkg-parsechangelog | grep "Version:" | cut -d " " -f2 | sed -e 's/^.*://' -e 's/-[^-]*$//' -e 's/~/_/g')"
 					REVISION="$(dpkg-parsechangelog | grep "Version:" | cut -d " " -f2 | sed -e 's/.*-//')"
+
+					# Before actually running git archive, we'd better fetch the branch first, in case it's new.
+					# Failures to do so are fatal now.
+					git fetch origin "upstream/${UPSTREAM_VERSION}:upstream/${UPSTREAM_VERSION}"
+
 					git archive --prefix="${PROJECT}-${UPSTREAM_VERSION}/" -o "../${PROJECT}_${UPSTREAM_VERSION}.orig.tar.gz" "upstream/${UPSTREAM_VERSION}" && {
 						SA_OPTION="--debbuildopts=-sa"
 					} || echo "1.0" > "debian/source/format"

--
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