diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-08-21 21:01:10 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-07-19 13:36:21 +0200 |
commit | 0fe6d2898a908e40d1cde9669ebc450a8792c3b6 (patch) | |
tree | 93d2824ef2cb1258fef1b53985989e7e55ed6a40 /bin/build-package | |
parent | 984f0ae8ce1212d1b0503e9dbd0c45ddadf90c0d (diff) | |
download | buildscripts-0fe6d2898a908e40d1cde9669ebc450a8792c3b6.tar.gz buildscripts-0fe6d2898a908e40d1cde9669ebc450a8792c3b6.tar.bz2 buildscripts-0fe6d2898a908e40d1cde9669ebc450a8792c3b6.zip |
add support quilt format, extracting upstream orig tarballs from git, if possible
Diffstat (limited to 'bin/build-package')
-rwxr-xr-x | bin/build-package | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/build-package b/bin/build-package index c510799..7b2549f 100755 --- a/bin/build-package +++ b/bin/build-package @@ -102,14 +102,17 @@ 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 origin $CHECKOUT + git pull --all origin $CHECKOUT # and again, get the $CHECKOUT refspec in pure state git reset --hard + git clean -df else cd "$(dirname $PROJECT_DIR)" git clone git://$GIT_HOSTNAME/$PROJECT_PATH.git + git fetch origin upstream:upstream cd "$PROJECT" git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT; + git clean -df fi cd "$PROJECT_DIR" @@ -190,8 +193,11 @@ build_packages() { GITREV=$(gitrevno) # we always build native packages for our repos test -f debian/source/format && cat debian/source/format | egrep '^3.0.*\(quilt\)$' >/dev/null && { - echo "3.0 (native)" > debian/source/format - } + git fetch origin upstream:upstream + UPSTREAM_VERSION=$(dpkg-parsechangelog | grep Version: | cut -d " " -f2 | sed -e 's/-.*// -e '/^.*://') + git archive --prefix=${PROJECT}-${UPSTREAM_VERSION} -o ../${PROJECT}_${UPSTREAM_VERSION}.orig.tar.gz upstream/${UPSTREAM_VERSION} || \ + echo "3.0 (native)" > debian/source/format + } # for Ubuntu version is the codename of the distribution release VERSION=$l_CODENAME |