Skip to content

Commit dce6e69

Browse files
committed
fix(workflows): strip inline comments from VERSION; preserve operator; fix e2e output path
- shared-release: strip inline Makefile comments (e.g. '# comment') from the VERSION value before semver validation to avoid false parse failures - shared-release: preserve the original assignment operator (?=, :=, =) when rewriting VERSION in the Makefile instead of normalising to '=' - e2e/action: output E2E_REPORT_PATH (.json report) instead of CONTROLLER_LOGS_PATH (.txt logs) to match the declared output description Signed-off-by: I313226 <onur.yilmaz@sap.com>
1 parent f42b82c commit dce6e69

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/shared-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
run: |
107107
CURRENT_VERSION=""
108108
if [ -n "$MAKEFILE_PATH" ]; then
109-
CURRENT_VERSION=$(grep -E '^VERSION[[:space:]]*[:?]?=' "$MAKEFILE_PATH" | head -1 | sed 's/.*=[[:space:]]*//' | tr -d '[:space:]' || true)
109+
CURRENT_VERSION=$(grep -E '^VERSION[[:space:]]*[:?]?=' "$MAKEFILE_PATH" | head -1 | sed 's/.*=[[:space:]]*//' | sed 's/[[:space:]]*#.*//' | tr -d '[:space:]' || true)
110110
fi
111111
if ! echo "$CURRENT_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
112112
if [ -n "$CHART_PATH" ]; then
@@ -155,7 +155,7 @@ jobs:
155155
NEW_VERSION: ${{ steps.version.outputs.new }}
156156
MAKEFILE_PATH: ${{ inputs.makefile-path }}
157157
run: |
158-
sed -i -E "s/^VERSION[[:space:]]*[:?]?=.*/VERSION = ${NEW_VERSION}/" "$MAKEFILE_PATH"
158+
sed -i -E "s/^(VERSION[[:space:]]*[:?]?=)[[:space:]]*.*/\1 ${NEW_VERSION}/" "$MAKEFILE_PATH"
159159
160160
- name: Update Makefile IMG tag
161161
if: inputs.bump-make-version == true && inputs.makefile-path != ''

workflows/e2e/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ runs:
107107
CONTROLLER_LOGS_PATH: ${{github.workspace}}/bin/${{inputs.scenario}}-${{inputs.remote-k8s-version}}.txt
108108
E2E_REPORT_PATH: ${{github.workspace}}/bin/${{inputs.scenario}}-${{inputs.remote-k8s-version}}.json
109109
run: |
110-
echo "result=$CONTROLLER_LOGS_PATH" >> $GITHUB_OUTPUT
110+
echo "result=$E2E_REPORT_PATH" >> $GITHUB_OUTPUT
111111
make e2e

0 commit comments

Comments
 (0)