The previous release could be an -rc release. And we have to remove the
'rc_num' macro before doing the final release, otherwise the RPM will have
an '-rcX' version suffix.
Change-Id: I06d26b4d0d68a6471dc9ad4383d7fd279e535164
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
# pylint: disable=R0915
# pylint: disable=R0912
-VERSION = "3.1"
+VERSION = "3.2"
import argparse
import sys
sed -i -e "s/^VERSION = \"[0-9]\+\.[0-9]\+\"$/VERSION = \"$new_ver\"/" bmaptool
# Sed the version in the RPM spec file
sed -i -e "s/^Version: [0-9]\+\.[0-9]\+$/Version: $new_ver/" packaging/bmap-tools.spec
+# Remove the "rc_num" macro from the RPM spec file to make sure we do not have
+# the "-rcX" part in the release version
+sed -i -e '/^%define[[:blank:]]\+rc_num[[:blank:]]\+[[:digit:]]\+[[:blank:]]*$/d' packaging/bmap-tools.spec
# Ask the maintainer for changelog lines
logfile="$(mktemp -t "$PROG.XXXX")"