forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease
executable file
·59 lines (48 loc) · 1.36 KB
/
release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
source release_lib.sh
CONTROL=debian/control
CHLOG=debian/changelog
CHDATE=$(LC_ALL=C date -R | sed -e 's/,/\\,/g') # Заменим запятую на '\,'
# Собирать пакет с конфигурационными файлами для Яндекс.Метрики.
BUILD_PACKAGE_FOR_METRIKA=$([ -f 'private/Server/metrika/config.xml' ] && echo 'yes')
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
else
echo "Unknown option $1"
exit 2
fi
done
# Список демонов для сборки может быть указан в аргументах командной строки.
if [ $# -gt 0 ]
then
DAEMONS="$@"
else
DAEMONS="$(echo `cat debian/daemons`)"
fi
if [[ $TEST != 'yes' ]]
then
gen_revision_author
else
REVISION=99999
fi
echo -e "\nCurrent revision is $REVISION"
make_control "$CONTROL" "$DAEMONS"
gen_changelog "$REVISION" "$CHDATE" "$AUTHOR" "$CHLOG" "$DAEMONS"
# Сборка (только бинарных пакетов).
debuild -e DAEMONS="${DAEMONS}" -e DISABLE_MONGODB -e CC -e CXX -b ${DEBUILD_NOSIGN_OPTIONS}
if [[ $STANDALONE != 'yes' ]]
then
upload_debs "$REVISION" "$DAEMONS"
fi