Skip to content

Introduce .gitattributes in favor of .distignore #217

Description

@mitogh

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.

Activity

added
InfrastructureIssues for the overall performance plugin infrastructure
Needs DevAnything that requires development (e.g. a pull request)
Good First IssueIssue particularly suitable to be worked on by new contributors
on Mar 7, 2022

jeffpaul commented on Mar 8, 2022

@jeffpaul
Member

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 commented on Mar 8, 2022

@felixarntz
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.

added
Needs DiscussionAnything that needs a discussion/agreement
and removed
Needs DevAnything that requires development (e.g. a pull request)
on Mar 8, 2022
added this to the 1.0.0-beta.2 milestone on Mar 8, 2022

mitogh commented on Mar 8, 2022

@mitogh
MemberAuthor

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 commented on Mar 8, 2022

@felixarntz
Member

@mitogh Good point, that makes sense to me.

So as a summary what needs to be done here:

added
Needs DevAnything that requires development (e.g. a pull request)
and removed
Needs DiscussionAnything that needs a discussion/agreement
on Mar 8, 2022
added and removed
Needs DevAnything that requires development (e.g. a pull request)
on Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueIssue particularly suitable to be worked on by new contributorsInfrastructureIssues for the overall performance plugin infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions