5e50090bfd
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: <20190422105304.23454-1-syuu@scylladb.com>
22 lines
526 B
Bash
Executable File
22 lines
526 B
Bash
Executable File
#!/bin/sh
|
|
|
|
PRODUCT=scylla
|
|
VERSION=666.development
|
|
|
|
if test -f version
|
|
then
|
|
SCYLLA_VERSION=$(cat version | awk -F'-' '{print $1}')
|
|
SCYLLA_RELEASE=$(cat version | awk -F'-' '{print $2}')
|
|
else
|
|
DATE=$(date +%Y%m%d)
|
|
GIT_COMMIT=$(git log --pretty=format:'%h' -n 1)
|
|
SCYLLA_VERSION=$VERSION
|
|
SCYLLA_RELEASE=$DATE.$GIT_COMMIT
|
|
fi
|
|
|
|
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
|