|
21 | 21 | - main |
22 | 22 | - v25_STABLE |
23 | 23 | - REL24_10 |
| 24 | + - custom |
| 25 | + |
| 26 | + custom_cli_branch: |
| 27 | + description: "If 'custom' selected above, provide cli branch name" |
| 28 | + required: false |
| 29 | + type: string |
24 | 30 |
|
25 | 31 | component: |
26 | 32 | description: "Spock in-dev component to additionally build (e.g. spock60)" |
@@ -116,7 +122,20 @@ jobs: |
116 | 122 | echo "Clean flag is disabled" |
117 | 123 | fi |
118 | 124 |
|
119 | | - SELECTED_CLI_BRANCH="${{ inputs.cli_branch }}" |
| 125 | + # If custom cli branch is chosen, set the branch provided in text field (cannot be empty) |
| 126 | + # otherwise set it to selection from the drop down. |
| 127 | + if [[ "${{ inputs.cli_branch }}" == "custom" ]]; then |
| 128 | + if [[ -z "${{ inputs.custom_cli_branch }}" ]]; then |
| 129 | + echo "Error: custom CLI branch selected but no branch name provided." |
| 130 | + exit 1 |
| 131 | + fi |
| 132 | + SELECTED_CLI_BRANCH="${{ inputs.custom_cli_branch }}" |
| 133 | + echo "Manual run: Using custom CLI branch: $SELECTED_CLI_BRANCH" |
| 134 | + else |
| 135 | + SELECTED_CLI_BRANCH="${{ inputs.cli_branch }}" |
| 136 | + echo "Manual run: Using CLI branch: $SELECTED_CLI_BRANCH" |
| 137 | + fi |
| 138 | +
|
120 | 139 | COMPONENT="${{ inputs.component }}" |
121 | 140 | BRANCH="${{ inputs.branch }}" |
122 | 141 | echo "Manual run: Component=$COMPONENT, Branch=$BRANCH, CLI Branch=$SELECTED_CLI_BRANCH" |
@@ -175,7 +194,10 @@ jobs: |
175 | 194 | git stash push -u -m "Temp stash for current build" || true |
176 | 195 |
|
177 | 196 | echo "Switching to branch: $CLI_BRANCH" |
178 | | - git checkout "$CLI_BRANCH" || true |
| 197 | + if ! git checkout "$CLI_BRANCH"; then |
| 198 | + echo "Error: Invalid CLI branch name provided: $CLI_BRANCH" |
| 199 | + exit 1 |
| 200 | + fi |
179 | 201 | echo "Branch checkout completed" |
180 | 202 |
|
181 | 203 | # Execute the build script and collect artifacts into src/ and bin/ |
|
0 commit comments