From d24a95d92bd0da17933cff66909501a8d64486f4 Mon Sep 17 00:00:00 2001 From: Mick Semb Wever Date: Mon, 21 Aug 2023 15:00:38 +0200 Subject: [PATCH] =?UTF-8?q?ninja-fix=20=E2=80=93=20building=20debian=20pac?= =?UTF-8?q?kages=20when=20on=20a=20git=20tag=20and=20the=20version=20conta?= =?UTF-8?q?ins=20-alphaN,=20-betaN,=20-rcN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .build/docker/_build-debian.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.build/docker/_build-debian.sh b/.build/docker/_build-debian.sh index e8cfe373eb..be9dbca693 100755 --- a/.build/docker/_build-debian.sh +++ b/.build/docker/_build-debian.sh @@ -75,7 +75,8 @@ if [ "$tag" ]; then echo "Error: could not recognize version from tag $tag">&2 exit 2 fi - CASSANDRA_VERSION=$git_version + # if CASSANDRA_VERSION is -alphaN, -betaN, -rcN, it fails on the '-' char; replace with '~' + CASSANDRA_VERSION=${git_version/-/\~} CASSANDRA_REVISION='1' else regx_branch="cassandra-([0-9.]+)$" @@ -92,7 +93,7 @@ else echo "Warning: could not recognize version from branch. dpkg version is $git_version" fi fi - # if CASSANDRA_VERSION is -alphaN, -betaN, -rcN, then rpmbuild fails on the '-' char; replace with '~' + # if CASSANDRA_VERSION is -alphaN, -betaN, -rcN, it fails on the '-' char; replace with '~' CASSANDRA_VERSION=${buildxml_version/-/\~} dt=`date +"%Y%m%d"` ref=`git rev-parse --short HEAD` @@ -120,7 +121,7 @@ fi dpkg-buildpackage -rfakeroot -uc -us -tc --source-option=--tar-ignore=.git # Move created artifacts to dist dir mapped to docker host directory (must have proper permissions) -mv ../cassandra[-_]*${CASSANDRA_VERSION}-* "${DIST_DIR}" +mv ../cassandra[-_]*${CASSANDRA_VERSION}* "${DIST_DIR}" # clean build deps rm -f cassandra-build-deps_* # restore debian/changelog