Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions scripts/detectNewVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -228,6 +228,10 @@ 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
newVersionMajor=$lastVersionMajor
newVersionMinor=$lastVersionMinor
newVersionPatch=$((lastVersionPatch + 1))
fi

newVersion=$(/usr/bin/env bash -c "${dir}/validateSemver.sh -9p full $newVersionMajor.$newVersionMinor.$newVersionPatch")
Expand Down