Merge pull request #4259 from yandex/manual_release_revision

Add ability to set version in release_lib.sh via env variables
This commit is contained in:
alexey-milovidov 2019-02-05 00:11:14 +03:00 committed by GitHub
commit 61e7ef31b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,8 @@ function gen_revision_author {
fi
VERSION_PATCH=$(($VERSION_PATCH + 1))
elif [ "$TYPE" == "env" ]; then
echo "Will build revision from env variables -- $VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
else
echo "Unknown version type $TYPE"
exit 1
@ -98,13 +100,16 @@ function gen_revision_author {
gen_dockerfiles "$VERSION_STRING"
dbms/src/Storages/System/StorageSystemContributors.sh ||:
git commit -m "$auto_message [$VERSION_STRING] [$VERSION_REVISION]" dbms/cmake/version.cmake debian/changelog docker/*/Dockerfile dbms/src/Storages/System/StorageSystemContributors.generated.cpp
if [ -z $NO_PUSH ]; then
git push
fi
echo "Generated version: ${VERSION_STRING}, revision: ${VERSION_REVISION}."
# Second tag for correct version information in version.cmake inside tag
if git tag --force -a "$tag" -m "$tag"
then
if [ -z $NO_PUSH ]; then
echo -e "\nTrying to push tag to origin: $tag"
git push origin "$tag"
if [ $? -ne 0 ]
@ -114,11 +119,16 @@ function gen_revision_author {
exit 1
fi
fi
fi
# Reset testing branch to current commit.
git checkout testing
git reset --hard "$tag"
if [ -z $NO_PUSH ]; then
git push
fi
else
get_version