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

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

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

t0mk
Copy link
Contributor

@t0mk t0mk commented Mar 7, 2024

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.

@t0mk t0mk force-pushed the fix_residual_pycache branch from 6f53749 to e6b588a Compare March 7, 2024 16:55
@ctreatma
Copy link
Contributor

ctreatma commented Mar 7, 2024

@semantic-release/git intentionally ignores the .gitignore: semantic-release/git#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
Copy link
Contributor Author

t0mk commented Mar 7, 2024

@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
Copy link
Contributor

ctreatma commented Mar 7, 2024

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.

@t0mk t0mk merged commit 4d2b67e into main Mar 11, 2024
2 of 3 checks passed
@t0mk t0mk deleted the fix_residual_pycache branch March 11, 2024 10:20
Copy link

This PR is included in version 0.4.1 🎉

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

Successfully merging this pull request may close these issues.

make @sematic-release/git ingore files (from our .gitignore) in release commit
2 participants