mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
release script: fix autogenerating date on --version call. clean unused.
This commit is contained in:
parent
e545777187
commit
b29fea5301
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -2,4 +2,4 @@ clickhouse (1.1.54280) unstable; urgency=low
|
||||
|
||||
* Modified source code
|
||||
|
||||
-- <robot-metrika-test@yandex-team.ru>
|
||||
-- proller <proller@yandex-team.ru> Fri, 18 Aug 2017 16:18:33 +0300
|
||||
|
3
release
3
release
@ -8,7 +8,6 @@ cd $CURDIR
|
||||
source "./release_lib.sh"
|
||||
|
||||
CONTROL=debian/control
|
||||
CHDATE=$(LC_ALL=C date -R | sed -e 's/,/\\,/g') # Replace comma to '\,'
|
||||
DEBUILD_NOSIGN_OPTIONS="-us -uc"
|
||||
|
||||
if [ -z "$REVISION" ] ; then
|
||||
@ -64,7 +63,7 @@ CMAKE_FLAGS_ADD+=" $LIBTCMALLOC_OPTS -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
|
||||
REVISION+=$VERSION_POSTFIX
|
||||
echo -e "\nCurrent revision is $REVISION"
|
||||
|
||||
gen_changelog "$REVISION" "$CHDATE" "$AUTHOR" ""
|
||||
gen_changelog "$REVISION" "" "$AUTHOR" ""
|
||||
|
||||
# Build (only binary packages).
|
||||
debuild -e PATH -e SSH_AUTH_SOCK -e DEB_BUILD_OPTIONS=parallel=$THREAD_COUNT -e DEB_CC -e DEB_CXX -e DEB_CLANG -e CMAKE_FLAGS_ADD="$CMAKE_FLAGS_ADD" -b ${DEBUILD_NOSIGN_OPTIONS} ${DEBUILD_NODEPS_OPTIONS}
|
||||
|
@ -3,9 +3,9 @@ function get_revision {
|
||||
grep "set(VERSION_REVISION" ${BASEDIR}/dbms/cmake/version.cmake | sed 's/^.*VERSION_REVISION \(.*\))$/\1/'
|
||||
}
|
||||
|
||||
# remove me after fixing all testing-building scripts
|
||||
function make_control {
|
||||
true
|
||||
function get_author {
|
||||
AUTHOR=$(git config --get user.name || echo ${USER})
|
||||
echo $AUTHOR
|
||||
}
|
||||
|
||||
# Generate revision number.
|
||||
@ -47,7 +47,7 @@ function gen_revision_author {
|
||||
git_describe=`git describe`
|
||||
sed -i -- "s/VERSION_REVISION .*)/VERSION_REVISION $REVISION)/g;s/VERSION_DESCRIBE .*)/VERSION_DESCRIBE $git_describe)/g" dbms/cmake/version.cmake
|
||||
|
||||
gen_changelog "$REVISION" "$CHDATE" "$AUTHOR" ""
|
||||
gen_changelog "$REVISION" "" "$AUTHOR" ""
|
||||
git commit -m "$auto_message [$REVISION]" dbms/cmake/version.cmake debian/changelog
|
||||
#git push
|
||||
|
||||
@ -78,7 +78,7 @@ function gen_revision_author {
|
||||
|
||||
function get_revision_author {
|
||||
REVISION=$(get_revision)
|
||||
AUTHOR=$(git config --get user.name || echo ${USER})
|
||||
AUTHOR=$(get_author)
|
||||
export REVISION
|
||||
export AUTHOR
|
||||
}
|
||||
@ -92,10 +92,18 @@ function gen_changelog {
|
||||
CHDATE="$2"
|
||||
AUTHOR="$3"
|
||||
CHLOG="$4"
|
||||
if [ -z "REVISION" ] ; then
|
||||
get_revision_author
|
||||
fi
|
||||
|
||||
if [ -z "$CHLOG" ] ; then
|
||||
CHLOG=debian/changelog
|
||||
fi
|
||||
|
||||
if [ -z "$CHDATE" ] ; then
|
||||
CHDATE=$(LC_ALL=C date -R | sed -e 's/,/\\,/g') # Replace comma to '\,'
|
||||
fi
|
||||
|
||||
sed \
|
||||
-e "s/[@]REVISION[@]/$REVISION/g" \
|
||||
-e "s/[@]DATE[@]/$CHDATE/g" \
|
||||
@ -103,29 +111,3 @@ function gen_changelog {
|
||||
-e "s/[@]EMAIL[@]/$(whoami)@yandex-team.ru/g" \
|
||||
< $CHLOG.in > $CHLOG
|
||||
}
|
||||
|
||||
# Upload to Metrica repository
|
||||
# working directory - where script is itself
|
||||
function upload_debs {
|
||||
REVISION="$1"
|
||||
# Determine the repository, in which you need to upload the packages. It corresponds to the version of Ubuntu.
|
||||
source /etc/lsb-release
|
||||
|
||||
if [ "$DISTRIB_CODENAME" == "precise" ]; then
|
||||
REPO="metrika"
|
||||
elif [ "$DISTRIB_CODENAME" == "trusty" ]; then
|
||||
REPO="metrika-trusty"
|
||||
elif [ "$DISTRIB_CODENAME" == "xenial" ]; then
|
||||
REPO="metrika-xenial"
|
||||
else
|
||||
echo -e "\n\e[0;31mUnknown Ubuntu version $DISTRIB_CODENAME \e[0;0m\n"
|
||||
fi
|
||||
|
||||
# Upload to Metrica repository.
|
||||
|
||||
cd ../
|
||||
DUPLOAD_CONF=dupload.conf
|
||||
cat src/debian/dupload.conf.in | sed -e "s/[@]AUTHOR[@]/$(whoami)/g" > $DUPLOAD_CONF
|
||||
|
||||
dupload metrika-yandex_1.1."$REVISION"_amd64.changes -t $REPO -c --nomail
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user