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

Avoid user / system files in generated zip #921

Closed
aduth opened this issue May 27, 2017 · 4 comments
Closed

Avoid user / system files in generated zip #921

aduth opened this issue May 27, 2017 · 4 comments
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Build Tooling Issues or PRs related to build tooling [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@aduth
Copy link
Member

aduth commented May 27, 2017

Notably Mac writes .DS_Store files to opened folders. With our current plugin build script, these would be included in archived build folders:

https://github.com/WordPress/gutenberg/blob/master/bin/build-plugin-zip.sh

May be simple enough to add an -x "*.DS_Store argument to the zip command:

https://superuser.com/a/198593

Or we could try to be fancier in accounting for more ignored files / extensions.

@aduth aduth added Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Task Issues or PRs that have been broken down into an individual action to take labels May 27, 2017
@nylen
Copy link
Member

nylen commented May 27, 2017

I wonder if we could use .gitignore for this.

@aduth
Copy link
Member Author

aduth commented May 27, 2017

I thought about that too. Couple problems:

  • .DS_Store is part of the global gitignore, not our project's
  • Some gitignore we want in zip, like build

@nylen
Copy link
Member

nylen commented May 27, 2017

Ok then, probably we should just list out the included files more specifically, whether explicitly (one file per line) or using glob patterns like blocks/build/*.{js,css,map} (note, this requires switching the script from #!/bin/sh to #!/bin/bash).

Also I just noticed that this script uses spaces instead of tabs for indentation, we might as well fix that at the same time.

@mtias mtias added the [Type] Build Tooling Issues or PRs related to build tooling label May 29, 2017
@jasmussen
Copy link
Contributor

See also #952.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Build Tooling Issues or PRs related to build tooling [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

4 participants