Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Read SCM ignore files to add to dir excludes and pattern ignores #195

Open
ironfroggy opened this issue Mar 7, 2019 · 1 comment
Open

Comments

@ironfroggy
Copy link
Contributor

Feature Request

Use Case

Some patterns and directories are excluded by default (like *.pyc files and the .git directory) but any ignored files in my repo are still included, and ignored files often include sensitive information.

Proposed Solution

Read .gitignore, .hgignore, etc not ignored patterns for mazer build's collection consumption.

Alternatives

Alternatively, if there is any strong case to ignore/exclude different files between the repo and the build, add an ignore file for mazer itself, like a .galaxyignore or something?

Implementation

It looks like there was some intention of this, given that the skipped patterns are described in the variable names as defaults here: https://github.com/ansible/mazer/blob/23ba54acf45a5d411ff75b402db33064a5894ef1/ansible_galaxy/collection_members.py

but there's currently no ticket tracking anything about extending beyond those defaults, and a default without a way to change is just a hardcode.

@alikins
Copy link
Contributor

alikins commented Mar 18, 2019

Good idea to add a issue for tracking requested changes to the default 'ignores' used by 'mazer build'

As of

bd8af98:

# No mechanism for configuring or overriding these defaults for any case.
DEFAULT_IGNORE_DIRS = ['releases', 'CVS', '.bzr', '.hg', '.git', 
                       '.svn', '__pycache__','.tox']
DEFAULT_IGNORE_PATTERNS = ['*.pyc', '*.retry']

In the future, could make it configurable, possibly per user or per collection.
Could also revisit supporting scm ignore file formats (ie, .gitignore etc)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants