From c456284cefb11da97f2bc23f88557ca0b93f7284 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sat, 16 Jul 2016 01:38:22 +0200 Subject: [PATCH] For release generate version file with target version. --- bin/build-helper | 7 ++++++- bin/build-helper.freebsd | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/build-helper b/bin/build-helper index 55c75ef4..ff628847 100755 --- a/bin/build-helper +++ b/bin/build-helper @@ -245,7 +245,7 @@ eof "$0" pep8 # Generate version file to be included in packaging - "$0" version + "$0" target-version # Ensure the git status is clean, else abort if ! git diff-index --name-only --exit-code HEAD ; then @@ -382,6 +382,11 @@ eof echo "VERSION = \"$(git describe)\"" > cdist/version.py ;; + target-version) + target_version=$($0 changelog-version) + echo "VERSION = \"${target_version}\"" > cdist/version.py + ;; + *) echo "Unknown helper target $@ - aborting" exit 1 diff --git a/bin/build-helper.freebsd b/bin/build-helper.freebsd index 9051ab0d..e5b081ff 100755 --- a/bin/build-helper.freebsd +++ b/bin/build-helper.freebsd @@ -280,7 +280,7 @@ eof "$0" pep8 # Generate version file to be included in packaging - "$0" version + "$0" target-version # Ensure the git status is clean, else abort if ! git diff-index --name-only --exit-code HEAD ; then @@ -444,6 +444,11 @@ eof echo "VERSION = \"$(git describe)\"" > cdist/version.py ;; + target-version) + target_version=$($0 changelog-version) + echo "VERSION = \"${target_version}\"" > cdist/version.py + ;; + *) echo "Unknown helper target $@ - aborting" exit 1