From 7fd25de6612f5a7366cebbdbde071b2edecb6f44 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Nov 2017 22:16:12 +0100 Subject: [PATCH] Update release script to include submodules in the archives Use "git submodule foreach" to run "git archive" in all of the submodules as well. Also document the requirement to have GNU tar which is needed to be able to successfully extract several concatenated tar archives. --- build/tools/release.sh | 9 ++++++++- docs/contributing/how-to-release.md | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/tools/release.sh b/build/tools/release.sh index 68dab59daa..967702c70b 100755 --- a/build/tools/release.sh +++ b/build/tools/release.sh @@ -37,7 +37,14 @@ trap cleanup INT TERM EXIT cleanup mkdir -p $destdir -git archive --prefix=$prefix/ HEAD | (cd $destdir; tar x) + +# We use GNU tar -i option to allow successfully extracting files from several +# tar archives concatenated together, without it we'd have to pipe output of +# each git-archive separately. +(git archive --prefix=$prefix/ HEAD; + git submodule foreach --quiet "cd $root/\$path && git archive --prefix=$prefix/\$path/ HEAD") | +tar x -C $destdir -i + cd $destdir # All setup0.h files are supposed to be renamed to just setup.h when checked # out and in the distribution. diff --git a/docs/contributing/how-to-release.md b/docs/contributing/how-to-release.md index a3a5a7aa6e..0285addaa9 100644 --- a/docs/contributing/how-to-release.md +++ b/docs/contributing/how-to-release.md @@ -2,7 +2,7 @@ Creating a new release requires a few things before getting started: -* Linux or OSX. +* Linux (or another Unix but GNU tar is required). * Windows 7+ with HTML Help Workshop, and Inno Setup installed. * 7-Zip, Doxygen 1.8.8, and GraphViz installed on both machines.