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

Update verify check to handle new pom files [skip ci] #9657

Merged
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: 2 additions & 1 deletion .github/workflows/mvn-verify-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ jobs:
# verify Scala 2.13 build files
./build/make-scala-version-build-files.sh 2.13
# verify git status
if ! git diff --exit-code 'scala2.13/*'; then
if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then
git add -N scala2.13/* && git diff 'scala2.13/*'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: * is unnecessary for git add

As a more compact fix we could just insert before L167 in the current code

git add -N scala2.13

which will be a NOP if there are no untracked files without changing anything else

Changes to this file don't affect the internal CI so adding [skip ci] to the PR title to save resources.

Comment on lines +167 to +168
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then
git add -N scala2.13/* && git diff 'scala2.13/*'
if [[ -n $(git status --porcelain scala2.13) ]]; then
git add -N scala2.13 && git diff scala2.13

echo "Generated Scala 2.13 build files don't match what's in repository"
exit 1
fi
Expand Down