Skip to content

Commit

Permalink
Conditionally set git user
Browse files Browse the repository at this point in the history
  • Loading branch information
petersutter authored Oct 28, 2024
1 parent 8c3036f commit 94e70f3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .ci/verify
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,19 @@ export SOURCE_PATH="$(readlink -f "$SOURCE_PATH")"

pushd "${SOURCE_PATH}" > /dev/null

git config --global user.email "gardener@sap.com"
git config --global user.name "Gardener CI/CD"
if [[ -z "$(git config --global user.email)" ]]; then
echo "Setting global Git user.email to gardener@sap.com"
git config --global user.email "gardener@sap.com"
else
echo "Global Git user.email is already set to $(git config --global user.email)"
fi

if [[ -z "$(git config --global user.name)" ]]; then
echo "Setting global Git user.name to Gardener CI/CD"
git config --global user.name "Gardener CI/CD"
else
echo "Global Git user.name is already set to $(git config --global user.name)"
fi

export GOLANGCI_LINT_ADDITIONAL_FLAGS="--verbose --timeout 2m"
export GO_TEST_ADDITIONAL_FLAGS="-race"
Expand Down

0 comments on commit 94e70f3

Please sign in to comment.