@@ -100,6 +100,10 @@ while [[ $# -gt 0 ]]; do
100100 targetDomain=" $2 "
101101 shift 2
102102 ;;
103+ --version) # Version (optional)
104+ version=" $2 "
105+ shift 2
106+ ;;
103107 * )
104108 echo " [ERROR] Unknown argument: $1 "
105109 exit 1
@@ -141,6 +145,10 @@ if [[ -z "$targetDomain" ]]; then
141145 targetDomain=" "
142146fi
143147
148+ if [[ -z " $version " ]]; then
149+ version=" "
150+ fi
151+
144152echo " ==================== Workflow Dispatch Parameters ===================="
145153echo " infraRepoName: $infraRepoName "
146154echo " releaseVersion: $releaseVersion "
@@ -159,6 +167,7 @@ echo " buildSandbox: $buildSandbox"
159167echo " apimEnvironment: $apimEnvironment "
160168echo " boundedContext: $boundedContext "
161169echo " targetDomain: $targetDomain "
170+ echo " version: $version "
162171
163172DISPATCH_EVENT=$( jq -ncM \
164173 --arg infraRepoName " $infraRepoName " \
@@ -177,6 +186,7 @@ DISPATCH_EVENT=$(jq -ncM \
177186 --arg apimEnvironment " $apimEnvironment " \
178187 --arg boundedContext " $boundedContext " \
179188 --arg targetDomain " $targetDomain " \
189+ --arg version " $version " \
180190 ' {
181191 "ref": "' " $internalRef " ' ",
182192 "inputs": (
@@ -193,6 +203,7 @@ DISPATCH_EVENT=$(jq -ncM \
193203 (if $apimEnvironment != "" then { "apimEnvironment": $apimEnvironment } else {} end) +
194204 (if $boundedContext != "" then { "boundedContext": $boundedContext } else {} end) +
195205 (if $targetDomain != "" then { "targetDomain": $targetDomain } else {} end) +
206+ (if $version != "" then { "version": $version } else {} end) +
196207 { "targetEnvironment": $targetEnvironment } +
197208 { "targetAccountGroup": $targetAccountGroup }
198209 )
0 commit comments