From 46fced9d44cbfd4828c5e78d3eccd4948b18a66a Mon Sep 17 00:00:00 2001 Message-Id: <46fced9d44cbfd4828c5e78d3eccd4948b18a66a.1747442650.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 9 Feb 2016 14:04:55 +0000 Subject: [PATCH] bin/mdw-build: Make `checkout=REV' actually work. Organization: Straylight/Edgeware From: Mark Wooding Collect the revision number from the checkout, and delay checking against the changelog. --- bin/mdw-build | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/mdw-build b/bin/mdw-build index b4c5cfe..9d2dad6 100755 --- a/bin/mdw-build +++ b/bin/mdw-build @@ -222,7 +222,6 @@ case "$checkout,$setup,$(yesno [ -d $srcpath/.git ])" in cd $srcpath [ "$(git ls-files -m)" = "" ] || warn "working tree has uncommitted changes" - gitver=$(git describe --abbrev=4) ;; esac @@ -242,6 +241,18 @@ case "$debian,$(yesno [ -d $srcpath/debian ])" in ;; esac +## Maybe check out a copy of the source. +case "$checkout" in + yes) + cd $releasepath + run git clone -sn $srcpath/.git _source + assign srcpath $releasepath/_source + cd $srcpath + run git checkout -b mdw-build $checkoutrev + gitver=$(git describe --abbrev=4) + ;; +esac + ## Check the version number. hack_dch_p=no case "$gitver,$debver" in @@ -255,17 +266,6 @@ case "$gitver,$debver" in ;; esac -## Maybe check out a copy of the source. -case "$checkout" in - yes) - cd $releasepath - run git clone -sn $srcpath/.git _source - assign srcpath $releasepath/_source - cd $srcpath - run git checkout -b mdw-build $checkoutrev - ;; -esac - ## Maybe refresh the build machinery. case "$setup" in yes) -- [mdw]