aboutsummaryrefslogtreecommitdiffstats
path: root/dtools
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2019-11-01 20:47:12 +0100
committerMartin Braun <martin.braun@ettus.com>2020-01-05 17:27:39 -0800
commit2cc67c0c0bcca248bbda347630620341aaff508d (patch)
tree1b280ad8b1775f8e223a3b66d8e1b492e38ff85e /dtools
parentFix heap corruption bug in async_decoder (diff)
downloadgnuradio-2cc67c0c0bcca248bbda347630620341aaff508d.tar.xz
gnuradio-2cc67c0c0bcca248bbda347630620341aaff508d.zip
roll-tarball.sh: Extract version string from CMakeLists.txt
This eradicates the human source of error, typing in the version number to use. Also, abandoned `git worktree`. It's simply broken if you have submodules.
Diffstat (limited to 'dtools')
-rwxr-xr-xdtools/bin/roll-tarball.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/dtools/bin/roll-tarball.sh b/dtools/bin/roll-tarball.sh
index e5c416613..ff638f375 100755
--- a/dtools/bin/roll-tarball.sh
+++ b/dtools/bin/roll-tarball.sh
@@ -21,7 +21,6 @@
setopt ERR_EXIT
project=gnuradio
-version=$1
tempdir=$(mktemp -d)
#use gpg2 if available, gpg else
@@ -29,10 +28,16 @@ gpg=$(which gpg2 2> /dev/null || which gpg)
#use parallel pigz if available, else gzip
gz=$(which pigz 2> /dev/null || which gzip)
+echo "Figuring out versions"
+version_major=$(grep -i 'set(version_major' CMakeLists.txt |sed 's/.*VERSION_MAJOR[[:space:]]*\([[:digit:]]*\))/\1/i')
+version_api=$(grep -i 'set(version_api' CMakeLists.txt |sed 's/.*VERSION_API[[:space:]]*\([[:digit:]]*\))/\1/i')
+version_abi=$(grep -i 'set(version_abi' CMakeLists.txt |sed 's/.*VERSION_ABI[[:space:]]*\([[:digit:]]*\))/\1/i')
+version_patch=$(grep -i 'set(version_patch' CMakeLists.txt |sed 's/.*VERSION_PATCH[[:space:]]*\([[:digit:]]*\))/\1/i')
+version="${version_major}.${version_api}.${version_abi}.${version_patch}"
echo "Releasing version ${version}"
echo "Making temporary clean worktree…"
-git worktree add "${tempdir}/${project}" "v$1"
+git clone --recursive "$(pwd)" "${tempdir}/${project}"
pushd "${tempdir}/${project}"
gitroot=$(pwd)
gitversion=$(git describe)
@@ -43,9 +48,6 @@ echo "Will use the following key for signing…"
gpg2 --list-keys "${signingkey}" || echo "Can't get info about key ${signingkey}. Did you forget to do 'git config --local user.signingkey=0xDEADBEEF'?'"
echo "… end of key info."
-echo "making sure submodules are up-to-date…"
-git submodule update --init
-echo "…sure."
archivedir=${gitroot}/archives
plaindir=${project}-${version}
@@ -113,6 +115,5 @@ mv "${archivedir}/"* "./archives/"
echo "… I'm moved."
echo "Clean up temporary files…"
-git worktree prune
rm -r ${tempdir}
echo "…all clean."