dist: merge product name parameter on single place
When we add product name customization, we mistakenly defined the parameter on each package build script. Number of script is increasing since we recently added relocatable python3 package, we should merge it in single place. Also we should save the parameter on relocatable package, just like version-release parameters. So move the definition to SCYLLA-VERSION-GEN, save it to build/SCYLLA-PRODUCT-FILE then archive it to relocatable package. Signed-off-by: Takuya ASADA <syuu@scylladb.com> Message-Id: <20190417163335.10191-1-syuu@scylladb.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
PRODUCT=scylla
|
||||
VERSION=666.development
|
||||
|
||||
if test -f version
|
||||
@@ -22,3 +23,4 @@ echo "$SCYLLA_VERSION-$SCYLLA_RELEASE"
|
||||
mkdir -p build
|
||||
echo "$SCYLLA_VERSION" > build/SCYLLA-VERSION-FILE
|
||||
echo "$SCYLLA_RELEASE" > build/SCYLLA-RELEASE-FILE
|
||||
echo "$PRODUCT" > build/SCYLLA-PRODUCT-FILE
|
||||
|
||||
2
dist/ami/build_ami.sh
vendored
2
dist/ami/build_ami.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
PRODUCT=scylla
|
||||
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)
|
||||
|
||||
if [ ! -e dist/ami/build_ami.sh ]; then
|
||||
echo "run build_ami.sh in top of scylla dir"
|
||||
|
||||
2
dist/debian/build_deb.sh
vendored
2
dist/debian/build_deb.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
PRODUCT=scylla
|
||||
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)
|
||||
|
||||
. /etc/os-release
|
||||
print_usage() {
|
||||
|
||||
2
dist/redhat/build_rpm.sh
vendored
2
dist/redhat/build_rpm.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
PRODUCT=scylla
|
||||
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)
|
||||
|
||||
. /etc/os-release
|
||||
print_usage() {
|
||||
|
||||
2
dist/redhat/python3/build_rpm.sh
vendored
2
dist/redhat/python3/build_rpm.sh
vendored
@@ -20,7 +20,7 @@
|
||||
# along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
PRODUCT=scylla
|
||||
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)
|
||||
|
||||
print_usage() {
|
||||
echo "${0} --reloc-pkg build/release/scylla-python3-package.tar.gz"
|
||||
|
||||
@@ -53,6 +53,6 @@ if [[ ! $OPTS =~ --reloc-pkg ]]; then
|
||||
OPTS="$OPTS --reloc-pkg $RELOC_PKG"
|
||||
fi
|
||||
mkdir -p $BUILDDIR/scylla-package
|
||||
tar -C $BUILDDIR/scylla-package -xpf $RELOC_PKG SCYLLA-RELOCATABLE-FILE SCYLLA-RELEASE-FILE SCYLLA-VERSION-FILE dist/redhat
|
||||
tar -C $BUILDDIR/scylla-package -xpf $RELOC_PKG SCYLLA-RELOCATABLE-FILE SCYLLA-RELEASE-FILE SCYLLA-VERSION-FILE SCYLLA-PRODUCT-FILE dist/redhat
|
||||
cd $BUILDDIR/scylla-package
|
||||
exec ./dist/redhat/build_rpm.sh $OPTS
|
||||
|
||||
@@ -37,6 +37,6 @@ if [[ ! $OPTS =~ --reloc-pkg ]]; then
|
||||
OPTS="$OPTS --reloc-pkg $RELOC_PKG"
|
||||
fi
|
||||
mkdir -p $BUILDDIR/scylla-python3-package
|
||||
tar -C $BUILDDIR/scylla-python3-package -xpf $RELOC_PKG SCYLLA-*-FILE dist/redhat/python3
|
||||
tar -C $BUILDDIR/scylla-python3-package -xpf $RELOC_PKG SCYLLA-RELOCATABLE-FILE SCYLLA-RELEASE-FILE SCYLLA-VERSION-FILE SCYLLA-PRODUCT-FILE dist/redhat/python3
|
||||
cd $BUILDDIR/scylla-python3-package
|
||||
exec ./dist/redhat/python3/build_rpm.sh $OPTS
|
||||
|
||||
@@ -152,6 +152,7 @@ ar.add('conf')
|
||||
ar.add('dist')
|
||||
ar.add('build/SCYLLA-RELEASE-FILE', arcname='SCYLLA-RELEASE-FILE')
|
||||
ar.add('build/SCYLLA-VERSION-FILE', arcname='SCYLLA-VERSION-FILE')
|
||||
ar.add('build/SCYLLA-PRODUCT-FILE', arcname='SCYLLA-PRODUCT-FILE')
|
||||
ar.add('seastar/scripts')
|
||||
ar.add('seastar/dpdk/usertools')
|
||||
ar.add('install.sh')
|
||||
|
||||
Reference in New Issue
Block a user