From 7751296fdaad7200c5e6e7ebe4e410382f28b8f2 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sat, 3 Feb 2018 01:51:34 -0800 Subject: [PATCH] tag_release: fix version validation when bumping patch on branch 1632.2.0 -> 1632.2.1 was being rejected. --- tag_release | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tag_release b/tag_release index 6cf2fad6f6..8ad71342d3 100755 --- a/tag_release +++ b/tag_release @@ -68,8 +68,11 @@ if [[ ${FLAGS_branch} -eq ${FLAGS_TRUE} ]]; then if [[ ${FLAGS_major} -ne ${CURRENT_VERSION[0]} ]]; then die_notrace "Branch major should be ${CURRENT_VERSION[0]}" fi - if [[ ${FLAGS_minor} -le ${CURRENT_VERSION[1]} ]]; then - die_notrace "Branch minor should be greater than ${CURRENT_VERSION[1]}" + if [[ ${FLAGS_minor} -lt ${CURRENT_VERSION[1]} ]]; then + die_notrace "Branch minor should be at least ${CURRENT_VERSION[1]}" + fi + if [[ ${FLAGS_minor} -eq ${CURRENT_VERSION[1]} && ${FLAGS_patch} -le ${CURRENT_VERSION[2]} ]]; then + die_notrace "With minor ${FLAGS_minor}, branch patch should be greater than ${CURRENT_VERSION[2]}" fi fi