equinix-labs / ansible-collection-equinix

Ansible content to help automate the management of Equinix resources
https://deploy.equinix.com/labs/ansible-collection-equinix/
GNU General Public License v3.0
2 stars 8 forks source link

fix: remove residual __pycache__ dirs and make sure they are swept after docs generating #171

Closed t0mk closed 3 months ago

t0mk commented 3 months ago

fixes #170

As described in #170, we got pycache dirs commited to main from semantic-release/git. This PR removes the pycache dirs and makes sure they are swept after docs generating.

This is not great solution. Anything else might be commited, but I did not find a way make semantic-release/git respect .gitignore.

ctreatma commented 3 months ago

@semantic-release/git intentionally ignores the .gitignore: https://github.com/semantic-release/git/issues/345

To avoid committing things that are in the .gitignore we would need to pass in a comprehensive assets setting for that plugin: https://github.com/semantic-release/git?tab=readme-ov-file#assets

t0mk commented 3 months ago

@ctreatma yes I found that out when investigating #170 . Ignoring .gitingore is a clear sing of an approach in a software project. Anyway, whitelisting assets won't help us to exclude subdirectories, unless we list every single file.

I think that forced find&delete is the way to go here. It is hard to maintain (what if make docs will create some other artifacts), but beats to make sure that every file added to the repo will have to be listed in some attribute in a dotfile.

ctreatma commented 3 months ago

Having the make tasks clean up after themselves is the approach that was taken in the Go SDK and is fine to replicate here. Note, though, that assets is documented as supporting negative glob matching, so it should be possible to make that more targeted.

github-actions[bot] commented 3 months ago

This PR is included in version 0.4.1 :tada: