From bb55f215ae71210680ce75b6e8b82ea67af91027 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 8 May 2023 19:58:41 -0700 Subject: [PATCH 1/3] Always increment patch --- scripts/detectNewVersion.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/detectNewVersion.sh b/scripts/detectNewVersion.sh index b170606..e7d05f5 100755 --- a/scripts/detectNewVersion.sh +++ b/scripts/detectNewVersion.sh @@ -228,6 +228,8 @@ elif [[ -n $count_fix || -n $count_bugfix || -n $count_hotfix || -n $count_ops ] [[ -n $count_bugfix ]] && newVersionPatch=$((newVersionPatch + count_bugfix)) [[ -n $count_hotfix ]] && newVersionPatch=$((newVersionPatch + count_hotfix)) [[ -n $count_ops ]] && newVersionPatch=$((newVersionPatch + count_ops)) +else + newVersionPatch=$((lastVersionPatch + 1)) fi newVersion=$(/usr/bin/env bash -c "${dir}/validateSemver.sh -9p full $newVersionMajor.$newVersionMinor.$newVersionPatch") From 080909f2b2e1ee8ec57bf47d2001e9a21142b0af Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 8 May 2023 20:15:19 -0700 Subject: [PATCH 2/3] disable sanity check --- scripts/detectNewVersion.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/detectNewVersion.sh b/scripts/detectNewVersion.sh index e7d05f5..a931799 100755 --- a/scripts/detectNewVersion.sh +++ b/scripts/detectNewVersion.sh @@ -194,19 +194,19 @@ fi # echo "hot: $count_hotfix" # echo "ops: $count_ops" -if [[ -n $arg_f ]]; then - true -else - if [[ -z $incrementMajor && -z $count_feature && -z $count_enhancement && -z $count_fix && -z $count_bugfix && -z $count_hotfix && -z $count_ops ]]; then - echo -e "\e[01;31mERROR\e[00m: No feature, enhancement, fix, bugfix, hotfix, or ops branches detected!" - exit 1 # For GH Actions - if [[ "$sourced" == 0 ]]; then - exit 1 - else - return 1 - fi - fi -fi +# if [[ -n $arg_f ]]; then +# true +# else +# if [[ -z $incrementMajor && -z $count_feature && -z $count_enhancement && -z $count_fix && -z $count_bugfix && -z $count_hotfix && -z $count_ops ]]; then +# echo -e "\e[01;31mERROR\e[00m: No feature, enhancement, fix, bugfix, hotfix, or ops branches detected!" +# exit 1 # For GH Actions +# if [[ "$sourced" == 0 ]]; then +# exit 1 +# else +# return 1 +# fi +# fi +# fi # -------------------------------------------------------------------------------------------------- # Main Operations From 3bf0f365eae91623a2ab8a46b3157cb2829b25ed Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 8 May 2023 20:30:11 -0700 Subject: [PATCH 3/3] set major and minor versions --- scripts/detectNewVersion.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/detectNewVersion.sh b/scripts/detectNewVersion.sh index a931799..495614e 100755 --- a/scripts/detectNewVersion.sh +++ b/scripts/detectNewVersion.sh @@ -229,6 +229,8 @@ elif [[ -n $count_fix || -n $count_bugfix || -n $count_hotfix || -n $count_ops ] [[ -n $count_hotfix ]] && newVersionPatch=$((newVersionPatch + count_hotfix)) [[ -n $count_ops ]] && newVersionPatch=$((newVersionPatch + count_ops)) else + newVersionMajor=$lastVersionMajor + newVersionMinor=$lastVersionMinor newVersionPatch=$((lastVersionPatch + 1)) fi