split out rename-with-buildhash

This commit is contained in:
Damien Elmes 2020-01-03 19:39:27 +10:00
parent 130c1a1f2f
commit 2fe250bcd5
2 changed files with 10 additions and 4 deletions

5
build
View File

@ -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

9
helpers/rename-with-buildhash Executable file
View File

@ -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/*