Skip to content

Fix shell syntax in version_git.sh and remove warning. #43196

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

Merged
merged 1 commit into from
Nov 23, 2021
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
3 changes: 1 addition & 2 deletions base/version_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ if [ -z "$fork_master_timestamp" ]; then
fi

build_system_directory="../.buildkite"
if [[ -d "${build_system_directory}/.git" ]]; then
if [ -d "${build_system_directory}/.git" ]; then
build_system_commit=$(git -C "${build_system_directory}" rev-parse HEAD)
build_system_commit_short=$(git -C "${build_system_directory}" rev-parse --short HEAD)
else
echo "Warning: The build system directory does not exist or is not a Git repo: ${build_system_directory}" >&2
build_system_commit=""
build_system_commit_short=""
fi
Expand Down