From 2fe250bcd57c700283cf4a25cd8b96973b1852e7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 3 Jan 2020 19:39:27 +1000 Subject: [PATCH] split out rename-with-buildhash --- build | 5 +---- helpers/rename-with-buildhash | 9 +++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 helpers/rename-with-buildhash diff --git a/build b/build index af2421d4a..17d2f5ccd 100755 --- a/build +++ b/build @@ -11,7 +11,4 @@ for dir in $DEVEL; do (cd $dir && make build BUILDFLAGS="$BUILDFLAGS") done -# add build hash to outputs -ver=$(cat meta/version) -hash=$(cat meta/buildhash) -(cd dist && rename "s/$ver/${ver}+$hash/" *.whl) +helpers/rename-with-buildhash diff --git a/helpers/rename-with-buildhash b/helpers/rename-with-buildhash new file mode 100755 index 000000000..20663e129 --- /dev/null +++ b/helpers/rename-with-buildhash @@ -0,0 +1,9 @@ +#!/bin/bash + +# add buildhash to output files +top=$(dirname $0)/.. +ver=$(cat $top/meta/version) +hash=$(cat $top/meta/buildhash) +rename "s/-${ver}-/-${ver}+${hash}-/" $top/dist/* + +