diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-04-07 21:34:37 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-04-17 16:09:04 +0300 |
commit | 1362be044724bb49d785ca2e296a3b43343c1690 (patch) | |
tree | 801c1a93f6fa2974ae67ada05ec0fb8393b488c0 /contrib/gitian-descriptors/make_git_archive | |
parent | 1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e (diff) | |
download | bitcoin-1362be044724bb49d785ca2e296a3b43343c1690.tar.xz |
build: Drop make dist in gitian builds
Diffstat (limited to 'contrib/gitian-descriptors/make_git_archive')
-rwxr-xr-x | contrib/gitian-descriptors/make_git_archive | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/gitian-descriptors/make_git_archive b/contrib/gitian-descriptors/make_git_archive new file mode 100755 index 0000000000..d922c94c60 --- /dev/null +++ b/contrib/gitian-descriptors/make_git_archive @@ -0,0 +1,20 @@ +# 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 be sourced into the gitian descriptors + +mkdir -p ${OUTDIR}/src +RECENT_TAG=$(git describe --abbrev=0 HEAD) +if [ $RECENT_TAG = $(git describe HEAD) ]; then + if [[ $RECENT_TAG == v* ]]; then + VERSION=${RECENT_TAG:1} + else + VERSION=$RECENT_TAG + fi +else + VERSION=$(git rev-parse --short HEAD) +fi +DISTNAME=bitcoin-${VERSION} +GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" +git archive --output=$GIT_ARCHIVE HEAD |