From 20a16fe8539842e9931a9180d93dda6996631d60 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 12 Apr 2019 19:58:43 +0200 Subject: [PATCH] Add version.py into generated raw source archive Resolves #751 --- bin/build-helper | 9 +++++++-- bin/build-helper.freebsd | 9 +++++++-- docs/changelog | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/bin/build-helper b/bin/build-helper index 2179a5ed..de4ced71 100755 --- a/bin/build-helper +++ b/bin/build-helper @@ -195,9 +195,14 @@ eof then archivename="$3" else - archivename="cdist-${tag}.tar.gz" + archivename="cdist-${tag}.tar" git archive --prefix="cdist-${tag}/" -o "${archivename}" "${tag}" \ || exit 1 + # make sure target version is generated + "$0" target-version + tar -r -f "${archivename}" cdist/version.py || exit 1 + gzip "${archivename}" || exit 1 + archivename="${archivename}.gz" fi gpg --armor --detach-sign "${archivename}" || exit 1 @@ -232,7 +237,7 @@ eof || exit 1 # remove generated files (archive and asc) - if [ $# -eq 2] + if [ $# -eq 2 ] then rm -f "${archivename}" fi diff --git a/bin/build-helper.freebsd b/bin/build-helper.freebsd index a2b8dde7..2c5a54a7 100755 --- a/bin/build-helper.freebsd +++ b/bin/build-helper.freebsd @@ -230,9 +230,14 @@ eof then archivename="$3" else - archivename="cdist-${tag}.tar.gz" + archivename="cdist-${tag}.tar" git archive --prefix="cdist-${tag}/" -o "${archivename}" "${tag}" \ || exit 1 + # make sure target version is generated + "$0" target-version + tar -r -f "${archivename}" cdist/version.py || exit 1 + gzip "${archivename}" || exit 1 + archivename="${archivename}.gz" fi gpg --armor --detach-sign "${archivename}" || exit 1 @@ -267,7 +272,7 @@ eof || exit 1 # remove generated files (archive and asc) - if [ $# -eq 2] + if [ $# -eq 2 ] then rm -f "${archivename}" fi diff --git a/docs/changelog b/docs/changelog index fccf2583..3bb5f03d 100644 --- a/docs/changelog +++ b/docs/changelog @@ -3,6 +3,7 @@ Changelog next: * Core: Fix broken quiet mode (Darko Poljak) + * Build: Add version.py into generated raw source archive (Darko Poljak) 4.10.10: 2019-04-11 * New types: __ufw and __ufw_rule (Mark Polyakov)