Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only strip the github/repo-name prefix if the file doesn't exist #61

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,12 @@ do
fi
done

# We want to support legacy style TRAMPOLINE_BUILD_FILE used with V1
# script: e.g. "github/repo-name/.kokoro/run_tests.sh"
TRAMPOLINE_BUILD_FILE="${TRAMPOLINE_BUILD_FILE#github/*/}"
if [[ ! -f "${TRAMPOLINE_BUILD_FILE}" ]]; then
# We want to support legacy style TRAMPOLINE_BUILD_FILE used with V1
# script: e.g. "github/repo-name/.kokoro/run_tests.sh"
log_yellow "TRAMPOLINE_BUILD_FILE is not found at provided path, stripping github and repo name."
TRAMPOLINE_BUILD_FILE="${TRAMPOLINE_BUILD_FILE#github/*/}"
fi
log_yellow "Using TRAMPOLINE_BUILD_FILE: ${TRAMPOLINE_BUILD_FILE}"

# ignore error on docker operations and test execution
Expand Down Expand Up @@ -505,4 +508,4 @@ if [[ "${update_cache}" == "true" ]] && \
fi
fi

exit "${test_retval}"
exit "${test_retval}"
Loading