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: Directory hidden files in write_source_file. #860

Merged

Conversation

jgiles
Copy link
Contributor

@jgiles jgiles commented Jun 1, 2024

Copy and manage hidden files starting with "." in write_source_files.

Previously these files were not supported if they were in the top level of the directory to copy.

Refs: #667


Changes are visible to end-users: yes/no

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: no

Test plan

  • Manual testing: Used this lib version to copy a directory of generated files that included hidden files.

Copy and manage hidden files starting with "." in write_source_files.

Previously these files were not supported if they were in the top level
of the directory to copy.
@CLAassistant
Copy link

CLAassistant commented Jun 1, 2024

CLA assistant check
All committers have signed the CLA.

@jgiles jgiles changed the title Fix #667: Dir hidden files in write_source_file. fix: Directory hidden files in write_source_file. Jun 1, 2024
@kormide
Copy link
Collaborator

kormide commented Jun 3, 2024

Thanks! Can you add a test?

lib/private/write_source_file.bzl Show resolved Hide resolved
lib/private/write_source_file.bzl Outdated Show resolved Hide resolved
@jgiles
Copy link
Contributor Author

jgiles commented Jun 7, 2024

Hey @kormide, I took a stab at adding a test, let me know if that's the right structure.

I also adjusted some of the commands - chmod and cp, without -f, were issuing an error when one of the glob patterns didn't resolve any files (so, if you had a directory with only hidden or only non-hidden files rather than mixed). The updated commands avoid that.

Copy link
Collaborator

@kormide kormide left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing this old issue! I'll wait for the CI run to pass before clicking approve.

@kormide kormide merged commit 3c0dbd5 into bazel-contrib:main Jun 11, 2024
24 checks passed
@jgiles jgiles deleted the fix-667-write-source-files-hidden branch June 11, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants