diff options
author | Carl Dong <contact@carldong.me> | 2020-04-22 13:00:42 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2020-04-28 10:36:35 -0400 |
commit | 395c1137f630dc495ffb2752a23bc1dfd470ee53 (patch) | |
tree | cc8064a00fc02d47c5c5d5e53bd97195cd532f50 /contrib/gitian-descriptors/assign_DISTNAME | |
parent | 6e3fc7492a7d5e58c0ada22617388b6487410f82 (diff) | |
download | bitcoin-395c1137f630dc495ffb2752a23bc1dfd470ee53.tar.xz |
gitian: Limit sourced script to just assignments
Previously, the sourced script would create the source tarball. Now, it
only assigns variables and the source-ing script has more flexibility in
determining what to do with these variables.
See later commit showing how this flexibility is useful in our Guix
builds.
Diffstat (limited to 'contrib/gitian-descriptors/assign_DISTNAME')
-rwxr-xr-x | contrib/gitian-descriptors/assign_DISTNAME | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/gitian-descriptors/assign_DISTNAME b/contrib/gitian-descriptors/assign_DISTNAME new file mode 100755 index 0000000000..a1ab3f7cbd --- /dev/null +++ b/contrib/gitian-descriptors/assign_DISTNAME @@ -0,0 +1,12 @@ +# 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 + +if RECENT_TAG="$(git describe --exact-match HEAD)"; then + VERSION="${RECENT_TAG#v}" +else + VERSION="$(git rev-parse --short HEAD)" +fi +DISTNAME="bitcoin-${VERSION}" |