From c474e46ae7604f9b6cf8801207300b81c97e0499 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 6 May 2020 13:37:02 +0000 Subject: [PATCH] build: Abstract release tarball generation to a utility script make_release_tarball Github-Pull: #18818 Rebased-From: 0ea34e7251ded519efeb0169653f2601f2b5658c (partial: gitian only) --- contrib/gitian-descriptors/gitian-linux.yml | 2 +- contrib/gitian-descriptors/gitian-osx.yml | 2 +- contrib/gitian-descriptors/gitian-win.yml | 2 +- contrib/gitian-descriptors/make_release_tarball | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 contrib/gitian-descriptors/make_release_tarball diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index ed218a0d2c6ce1..290bbbfaa6bb18 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -148,7 +148,7 @@ script: | # Create the source tarball mkdir -p "$(dirname "$GIT_ARCHIVE")" - git archive --output="$GIT_ARCHIVE" HEAD + contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" ORIGPATH="$PATH" # Extract the git archive into a dir for each host and build diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 5cb6e6f1248aa5..00565f5626f544 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -111,7 +111,7 @@ script: | # Create the source tarball mkdir -p "$(dirname "$GIT_ARCHIVE")" - git archive --output="$GIT_ARCHIVE" HEAD + contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" ORIGPATH="$PATH" # Extract the git archive into a dir for each host and build diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 6642a846aa09af..52ba1b2dcfc60b 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -116,7 +116,7 @@ script: | # Create the source tarball mkdir -p "$(dirname "$GIT_ARCHIVE")" - git archive --output="$GIT_ARCHIVE" HEAD + contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" ORIGPATH="$PATH" # Extract the git archive into a dir for each host and build diff --git a/contrib/gitian-descriptors/make_release_tarball b/contrib/gitian-descriptors/make_release_tarball new file mode 100755 index 00000000000000..cf24b39d38a21f --- /dev/null +++ b/contrib/gitian-descriptors/make_release_tarball @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# +# A helper script to generate source release tarball + +GIT_ARCHIVE="$1" +. "`dirname "$0"`/assign_DISTNAME" +git archive --output="${GIT_ARCHIVE}" HEAD