ClickHouse/release

69 lines
1.4 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
# List of daemons to build could be specified in command line arguments.
2016-02-07 20:02:44 +00:00
if [ $# -gt 0 ]
then
DAEMONS="$@"
else
DAEMONS="$(echo `cat debian/daemons`)"
fi
2016-06-10 14:42:05 +00:00
if [[ $TEST != 'yes' ]]
then
gen_revision_author
else
REVISION=99999
fi
2016-02-07 20:02:44 +00:00
echo -e "\nCurrent revision is $REVISION"
make_control "$CONTROL" "$DAEMONS"
gen_changelog "$REVISION" "$CHDATE" "$AUTHOR" "$CHLOG" "$DAEMONS"
# Build (only binary packages).
2017-01-10 19:42:24 +00:00
debuild -e DAEMONS="${DAEMONS}" -e ENABLE_MONGODB -e GLIBC_COMPATIBILITY -e CC -e CXX -b ${DEBUILD_NOSIGN_OPTIONS} ${DEBUILD_NODEPS_OPTIONS}
2016-02-07 20:02:44 +00:00
if [[ $STANDALONE != 'yes' ]]
then
upload_debs "$REVISION" "$DAEMONS"
fi