From: Zhelong Zhao <50295684+zztaki@users.noreply.github.com> Date: Sun, 6 Aug 2023 14:29:34 +0000 (+0800) Subject: script/backport-resolve-issue: fix script to handle RC versions X-Git-Tag: v19.0.0~729^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8ef771d4865f38a63e185a3d5e6b9832166f669e;p=ceph.git script/backport-resolve-issue: fix script to handle RC versions Fixes: https://tracker.ceph.com/issues/61746 Signed-off-by: Zhelong Zhao Signed-off-by: Zhelong Zhao <50295684+zztaki@users.noreply.github.com> --- diff --git a/src/script/backport-resolve-issue b/src/script/backport-resolve-issue index b8f1d8be269e4..a153fa778a133 100755 --- a/src/script/backport-resolve-issue +++ b/src/script/backport-resolve-issue @@ -522,7 +522,10 @@ Ceph version: base {}, target {}''' maybe_stable = "v{}.{}".format(x, y) assert ver_to_release()[maybe_stable], \ "SHA1 {} is not based on any known stable release ({})".format(sha1, maybe_stable) - tv = "v{}.{}.{}".format(x, y, int(z) + 1) + if int(y) == 0: + tv = "v{}.{}.{}".format(x, 1, z) + else: + tv = "v{}.{}.{}".format(x, y, int(z) + 1) if tv in version2version_id: self.target_version = tv else: