Skip to content

Commit ddb24db

Browse files
committed
feat: added support for increment-mode option
1 parent 338bbd8 commit ddb24db

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ inputs:
101101
increment:
102102
description: "Manually specify the desired increment"
103103
required: false
104+
increment_mode:
105+
description: "Mode for incrementing version (linear, exact)"
106+
required: false
107+
default: "linear"
104108
check_consistency:
105109
default: "false"
106110
description: "check consistency among versions defined in commitizen configuration and version_files"

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ fi
8282
if [[ $INPUT_INCREMENT ]]; then
8383
CZ_CMD+=('--increment' "$INPUT_INCREMENT")
8484
fi
85+
if [[ $INPUT_INCREMENT_MODE && ("$INPUT_INCREMENT_MODE" == "linear" || "$INPUT_INCREMENT_MODE" == "exact") ]]; then
86+
CZ_CMD+=('--increment-mode' "$INPUT_INCREMENT_MODE")
87+
fi
8588
if [[ $INPUT_CHECK_CONSISTENCY == 'true' ]]; then
8689
CZ_CMD+=('--check-consistency')
8790
fi

0 commit comments

Comments
 (0)