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

Introduce .gitattributes in favor of .distignore #217

Closed
mitogh opened this issue Mar 7, 2022 · 4 comments · Fixed by #223
Closed

Introduce .gitattributes in favor of .distignore #217

mitogh opened this issue Mar 7, 2022 · 4 comments · Fixed by #223
Labels
Good First Issue Issue particularly suitable to be worked on by new contributors Infrastructure Issues for the overall performance plugin infrastructure Needs Review Anything that requires code review
Milestone

Comments

@mitogh
Copy link
Member

mitogh commented Mar 7, 2022

Feature Description

The current release zips created by GH everytime a new tag is created includes files that are not part of the release, for example:

Contains tests and configuration files, non required for testing or usage of the plugin.

2022-03-07_16-43

The deploy action would use either:

  • .disignore
  • .gitattributes

To exclude files that are going to be deployed so we can safely move .disignore to .gitattributes one of the things to consider is when moving the content into .gitattributes is the fact that the setting export-ignore should be added after each file for example:

/.git export-ignore
/node_modules export-ignore

export-ignore

Files and directories with the attribute export-ignore won’t be added to archive files.

Additional parameters.

@mitogh mitogh added Infrastructure Issues for the overall performance plugin infrastructure Needs Dev Anything that requires development (e.g. a pull request) Good First Issue Issue particularly suitable to be worked on by new contributors labels Mar 7, 2022
@jeffpaul
Copy link
Member

jeffpaul commented Mar 8, 2022

Will also want to make sure that README.md gets added to either file as that's currently being published to WP.org (alongside the more useful readme.txt file), see: https://plugins.trac.wordpress.org/browser/performance-lab/trunk/README.md

@felixarntz
Copy link
Member

@mitogh Why should we be using .gitattributes over .distignore? I'm not sure I see the benefits of that.

@jeffpaul Great catch, README.md should definitely be excluded as well.

@felixarntz felixarntz added Needs Discussion Anything that needs a discussion/agreement and removed Needs Dev Anything that requires development (e.g. a pull request) labels Mar 8, 2022
@felixarntz felixarntz added this to Backlog in Infrastructure via automation Mar 8, 2022
@felixarntz felixarntz added this to the 1.0.0-beta.2 milestone Mar 8, 2022
@mitogh
Copy link
Member Author

mitogh commented Mar 8, 2022

Why should we be using .gitattributes over .distignore? I'm not sure I see the benefits of that.

ZIPs created from a release tag contains non required files:

Benefits

  • When using gitattributes those files won't be included on the created file instead.
  • Zip from the release tag would match closely the ZIP from WP.org instead
  • gitattributes works for the WP release action so we get both benefits in both areas.

@felixarntz
Copy link
Member

@mitogh Good point, that makes sense to me.

So as a summary what needs to be done here:

@felixarntz felixarntz added Needs Dev Anything that requires development (e.g. a pull request) and removed Needs Discussion Anything that needs a discussion/agreement labels Mar 8, 2022
@felixarntz felixarntz moved this from Backlog to To do in Infrastructure Mar 8, 2022
@bethanylang bethanylang moved this from To do to Review in Infrastructure Mar 9, 2022
@mitogh mitogh added Needs Review Anything that requires code review and removed Needs Dev Anything that requires development (e.g. a pull request) labels Mar 9, 2022
Infrastructure automation moved this from Review to Done Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Issue particularly suitable to be worked on by new contributors Infrastructure Issues for the overall performance plugin infrastructure Needs Review Anything that requires code review
Projects
Development

Successfully merging a pull request may close this issue.

3 participants