osmo-release.sh: Allow forcing release without LIBVERSION bump

Sometimes a fix release may be required which only contains fixes to
parts not related to a shared library, for instance a fix in the build
system. Thus allow releasing without bumping LIBVERSION, but only
through env var setting for people who know what they are doing.

Change-Id: I91e186d47638038bc2968ea0178879365ffc9512
This commit is contained in:
Pau Espin 2018-08-30 12:56:53 +02:00
parent 941fd9be1b
commit cf8497cb2f
1 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,8 @@ if [ "z$REL" = "z" ]; then
REL="patch"
fi
ALLOW_NO_LIBVERSION_CHANGE="${ALLOW_NO_LIBVERSION_CHANGE:-0}"
BUMPVER=`command -v bumpversion`
NEW_VER=`bumpversion --list --current-version $VERSION $REL --allow-dirty | awk -F '=' '{ print $2 }'`
@ -27,12 +29,13 @@ fi
echo "Releasing $VERSION -> $NEW_VER..."
if [ "z$LIBVERS" != "z" ]; then
if [ "z$MAKEMOD" = "z" ]; then
echo "Before releasing, please modify some of the libversions: $LIBVERS"
if [ "z$MAKEMOD" = "z" ] && [ "z$ALLOW_NO_LIBVERSION_CHANGE" = "z0" ]; then
echo "ERROR: Before releasing, please modify some of the libversions: $LIBVERS"
echo "You should NOT be doing this unless you've read and understood following article:"
echo "https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info"
exit 1
fi
if [ -f "TODO-RELEASE" ]; then
grep '#' TODO-RELEASE > TODO-RELEASE.clean
mv TODO-RELEASE.clean TODO-RELEASE