Skip to content

Commit f6d0098

Browse files
fix: sed replace expression to update latest e2e tests
1 parent 05f7dbc commit f6d0098

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

kash.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -1900,10 +1900,9 @@ push_e2e_tests_report_to_git_repo() {
19001900

19011901
# Try add link to 'latest' section
19021902
local LATEST_REPORT
1903-
LATEST_REPORT=$(realpath --relative-to="$WORK_DIR" "$REPORT_FILE")
1903+
LATEST_REPORT="$(realpath --relative-to="$WORK_DIR" "$REPORT_DIR")/$(basename "$REPORT_FILE")"
19041904

1905-
# It's ok if this fails
1906-
sed -i 's/^['"$APP"' e2e](.*)$/['"$APP"' e2e]('"$LATEST_REPORT"')/' "$WORK_DIR/README.md" || true
1905+
sed -i 's#^\['"$APP"' e2e\](.*)$#\['"$APP"' e2e\]('"${LATEST_REPORT//./\\.}"')#' "$WORK_DIR/README.md"
19071906

19081907
cd "$WORK_DIR"
19091908
git add --all
@@ -1931,7 +1930,7 @@ run_and_publish_e2e_tests_to_git_repo() {
19311930
local REPOSITORY_URL="$5"
19321931
local REPORTS_BASE="$6"
19331932

1934-
run_e2e_tests "$ROOT_DIR" "$APP" || true
1933+
run_e2e_tests "$ROOT_DIR" "$APP"
19351934

19361935
local MD_FLAVOR
19371936
[[ "$REPOSITORY_URL" = *gitlab* ]] && MD_FLAVOR="gitlab"

0 commit comments

Comments
 (0)