aboutsummaryrefslogtreecommitdiff
path: root/contrib/gitian/gitian-win.yml
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2019-06-27 22:25:20 +0200
committerTheCharlatan <seb.kung@gmail.com>2019-06-27 22:25:20 +0200
commit9a5933f705fa8ebc93975e1eb88e1c963cc49ae6 (patch)
tree0cc94d1e420a66eecfc1ee834583b64909d55bc4 /contrib/gitian/gitian-win.yml
parentMerge pull request #5641 (diff)
downloadmonero-9a5933f705fa8ebc93975e1eb88e1c963cc49ae6.tar.xz
Gitian: Add version string to output tar archives
The tar archives generated by gitian are currently unversioned. This adds either a tag name when building from a tag, or a short commit id when building from a commit hash.
Diffstat (limited to 'contrib/gitian/gitian-win.yml')
-rw-r--r--contrib/gitian/gitian-win.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/gitian/gitian-win.yml b/contrib/gitian/gitian-win.yml
index d15383905..4c559acfe 100644
--- a/contrib/gitian/gitian-win.yml
+++ b/contrib/gitian/gitian-win.yml
@@ -102,6 +102,13 @@ script: |
git config --global core.abbrev 9
cd monero
+ # Set the version string that gets added to the tar archive name
+ version="`git describe`"
+ if [[ $version == *"-"*"-"* ]]; then
+ version="`git rev-parse --short=9 HEAD`"
+ version="`echo $version | head -c 9`"
+ fi
+
BASEPREFIX=`pwd`/contrib/depends
# Build dependencies for each host
for i in $HOSTS; do
@@ -127,7 +134,7 @@ script: |
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${BASEPREFIX}/${i}/share/toolchain.cmake
make ${MAKEOPTS}
- DISTNAME=monero-${i}
+ DISTNAME=monero-${i}-${version}
mv bin ${DISTNAME}
find ${DISTNAME}/ | sort | zip -X@ ${OUTDIR}/${DISTNAME}.zip
cd .. && rm -rf build