SCYLLA-VERSION-GEN: use semver-compatible version
Setting Scylla to use semantic versioning. (Ref: https://semver.org/) Closes: https://github.com/scylladb/scylla/issues/9543 Closes #10957
This commit is contained in:
@@ -60,7 +60,7 @@ fi
|
||||
|
||||
# Default scylla product/version tags
|
||||
PRODUCT=scylla
|
||||
VERSION=5.1.dev
|
||||
VERSION=5.1.0-dev
|
||||
|
||||
if test -f version
|
||||
then
|
||||
|
||||
@@ -1535,7 +1535,7 @@ if status != 0:
|
||||
sys.exit(1)
|
||||
|
||||
file = open(f'{outdir}/SCYLLA-VERSION-FILE', 'r')
|
||||
scylla_version = file.read().strip()
|
||||
scylla_version = file.read().strip().replace('-', '~')
|
||||
file = open(f'{outdir}/SCYLLA-RELEASE-FILE', 'r')
|
||||
scylla_release = file.read().strip()
|
||||
file = open(f'{outdir}/SCYLLA-PRODUCT-FILE', 'r')
|
||||
@@ -2153,7 +2153,7 @@ with open(buildfile, 'w') as f:
|
||||
build dist-server: phony dist-server-tar dist-server-compat dist-server-compat-arch dist-server-rpm dist-server-deb
|
||||
|
||||
rule build-submodule-reloc
|
||||
command = cd $reloc_dir && ./reloc/build_reloc.sh --version $$(<../../build/SCYLLA-PRODUCT-FILE)-$$(<../../build/SCYLLA-VERSION-FILE)-$$(<../../build/SCYLLA-RELEASE-FILE) --nodeps $args
|
||||
command = cd $reloc_dir && ./reloc/build_reloc.sh --version $$(<../../build/SCYLLA-PRODUCT-FILE)-$$(sed 's/-/~/' <../../build/SCYLLA-VERSION-FILE)-$$(<../../build/SCYLLA-RELEASE-FILE) --nodeps $args
|
||||
rule build-submodule-rpm
|
||||
command = cd $dir && ./reloc/build_rpm.sh --reloc-pkg $artifact
|
||||
rule build-submodule-deb
|
||||
|
||||
2
dist/debian/debian_files_gen.py
vendored
2
dist/debian/debian_files_gen.py
vendored
@@ -29,7 +29,7 @@ with open('build/SCYLLA-PRODUCT-FILE') as f:
|
||||
product = f.read().strip()
|
||||
|
||||
with open('build/SCYLLA-VERSION-FILE') as f:
|
||||
version = f.read().strip().replace('.rc', '~rc').replace('_', '-')
|
||||
version = f.read().strip().replace('-', '~')
|
||||
|
||||
with open('build/SCYLLA-RELEASE-FILE') as f:
|
||||
release = f.read().strip()
|
||||
|
||||
6
dist/docker/debian/build_docker.sh
vendored
6
dist/docker/debian/build_docker.sh
vendored
@@ -9,13 +9,9 @@
|
||||
#
|
||||
|
||||
product="$(<build/SCYLLA-PRODUCT-FILE)"
|
||||
version="$(<build/SCYLLA-VERSION-FILE)"
|
||||
version="$(sed 's/-/~/' <build/SCYLLA-VERSION-FILE)"
|
||||
release="$(<build/SCYLLA-RELEASE-FILE)"
|
||||
|
||||
if [[ "$version" = *rc* ]]; then
|
||||
version=$(echo $version |sed 's/\(.*\)\.)*/\1~/')
|
||||
fi
|
||||
|
||||
mode="release"
|
||||
|
||||
if uname -m | grep x86_64 ; then
|
||||
|
||||
@@ -51,7 +51,7 @@ tar -C $BUILDDIR/ -xpf $RELOC_PKG scylla/SCYLLA-RELOCATABLE-FILE scylla/SCYLLA-R
|
||||
cd $BUILDDIR/scylla
|
||||
|
||||
RELOC_PKG_BASENAME=$(basename $RELOC_PKG)
|
||||
SCYLLA_VERSION=$(cat SCYLLA-VERSION-FILE)
|
||||
SCYLLA_VERSION=$(sed 's/-/~/' SCYLLA-VERSION-FILE)
|
||||
SCYLLA_RELEASE=$(cat SCYLLA-RELEASE-FILE)
|
||||
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if [ ! -f build/SCYLLA-PRODUCT-FILE ]; then
|
||||
./SCYLLA-VERSION-GEN
|
||||
fi
|
||||
PRODUCT=`cat build/SCYLLA-PRODUCT-FILE`
|
||||
VERSION=`cat build/SCYLLA-VERSION-FILE`
|
||||
VERSION=`sed 's/-/~/' build/SCYLLA-VERSION-FILE`
|
||||
VERSION_ESC=${VERSION//./\.}
|
||||
RELEASE=`cat build/SCYLLA-RELEASE-FILE`
|
||||
RELEASE_ESC=${RELEASE//./\.}
|
||||
|
||||
Reference in New Issue
Block a user