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

.github/workflows/google-fonts.yml: fix changes check #187132

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bevanjkay
Copy link
Member

Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

In the following questions <cask> is the token of the cask you're submitting.

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • Checked the cask was not already refused (add your cask's name to the end of the search field).
  • brew audit --cask --new <cask> worked successfully.
  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

@bevanjkay bevanjkay marked this pull request as draft October 1, 2024 10:41
@bevanjkay bevanjkay marked this pull request as ready for review October 1, 2024 10:50
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Seems like it should work as intended, barring a few edge cases. But I don't really follow how this was broken before this change so I can't judge how appropriate these changes are.

AFAICT they do the same thing, but I presume that's not true otherwise we wouldn't have this PR.

.github/workflows/google-fonts.yml Outdated Show resolved Hide resolved
.github/workflows/google-fonts.yml Outdated Show resolved Hide resolved
.github/workflows/google-fonts.yml Outdated Show resolved Hide resolved
.github/workflows/google-fonts.yml Outdated Show resolved Hide resolved
.github/workflows/google-fonts.yml Outdated Show resolved Hide resolved
@bevanjkay
Copy link
Member Author

I'll have a look through the comments in a bit, but this workflow hasn't worked correctly since all the workflows were reworked en-masse a couple of months ago.

Comment on lines 76 to 80
git ls-files --modified --others -z | xargs -0 -I {} sh -c "
FILENAME=\"{}\"
MESSAGE=\$(basename \"\$FILENAME\" .rb)
git add \"\$FILENAME\"
git commit \"\$FILENAME\" --message=\"\$MESSAGE: \$MODE\" --message=\"\$COMMIT_BODY\""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
git ls-files --modified --others -z | xargs -0 -I {} sh -c "
FILENAME=\"{}\"
MESSAGE=\$(basename \"\$FILENAME\" .rb)
git add \"\$FILENAME\"
git commit \"\$FILENAME\" --message=\"\$MESSAGE: \$MODE\" --message=\"\$COMMIT_BODY\""
git ls-files --modified --others -z | xargs -0 -I {} sh -c '
MESSAGE="$(basename "{}" .rb)"
git add "{}"
git commit "{}" --message="$MESSAGE: $MODE" --message="$COMMIT_BODY"'

You probably don't need all the escaping. If MODE and COMMIT_BODY are missing then try doing export MODE COMMIT_BODY before calling xargs

@bevanjkay bevanjkay force-pushed the google-fonts-fix branch 2 times, most recently from f681110 to 898badc Compare October 3, 2024 12:49
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Seems fine!

@bevanjkay bevanjkay force-pushed the google-fonts-fix branch 2 times, most recently from 8f6d1ef to a39055d Compare October 3, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants