ClickHouse/release

60 lines
1.3 KiB
Plaintext
Raw Normal View History

2016-02-07 20:02:44 +00:00
#!/bin/bash
2016-08-25 17:13:50 +00:00
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/release_lib.sh"
2016-02-07 20:02:44 +00:00
CONTROL=debian/control
CHLOG=debian/changelog
CHDATE=$(LC_ALL=C date -R | sed -e 's/,/\\,/g') # Replace comma to '\,'
2016-02-07 20:02:44 +00:00
# Build a package with configuration files for Yandex.Metrika.
BUILD_PACKAGE_FOR_METRIKA=$([ -f 'private/Server/metrika/config.xml' ] && echo 'yes')
2016-06-10 14:42:05 +00:00
while [[ $1 == --* ]]
do
# Don't sign packages, don't upload, don't create tags.
if [[ $1 == '--standalone' ]]
then
STANDALONE='yes'
DEBUILD_NOSIGN_OPTIONS="-us -uc"
shift
elif [[ $1 == '--test' ]]
then
STANDALONE='yes'
TEST='yes'
DEBUILD_NOSIGN_OPTIONS="-us -uc"
shift
2017-01-10 19:42:24 +00:00
elif [[ $1 == '--ignore-deps' ]]
then
DEBUILD_NODEPS_OPTIONS="-d"
shift
elif [[ $1 == '--version' ]]
then
gen_revision_author
git push
exit 0
2016-06-10 14:42:05 +00:00
else
echo "Unknown option $1"
exit 2
fi
done
2016-06-10 14:42:05 +00:00
if [[ $TEST != 'yes' ]]
then
2017-03-16 15:35:50 +00:00
# now incrementing done in external release scripts via --version
get_revision_author
2016-06-10 14:42:05 +00:00
else
REVISION=99999
fi
2016-02-07 20:02:44 +00:00
echo -e "\nCurrent revision is $REVISION"
gen_changelog "$REVISION" "$CHDATE" "$AUTHOR" "$CHLOG"
2016-02-07 20:02:44 +00:00
# Build (only binary packages).
debuild -eDEB_BUILD_OPTIONS=parallel=`nproc || grep -c ^processor /proc/cpuinfo` -e DEB_CC -e DEB_CXX -e CMAKE_FLAGS_ADD -b ${DEBUILD_NOSIGN_OPTIONS} ${DEBUILD_NODEPS_OPTIONS}
2016-02-07 20:02:44 +00:00
if [[ $STANDALONE != 'yes' ]]
then
upload_debs "$REVISION"
fi