Skip to content

feat: add optional support to respect the git ignorefile #527

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kenneth-Sills
Copy link

This is a simple flag configuration that controls whether the git commands we run internally respect .gitignore (or whatever core.excludesFile is set to), allowing downstream users to specify more broad assets settings that are then restricted by the local ignore file.

This is particularly useful when making shared configurations that, in my particular case, may need to perform last-minute file updates via the postversion NPM lifecycle script that must be committed to the project repository (updating the version in manifest.json for a browser extension).

Based on maintainer opinion in #55 / #357 to avoid increasing maintenance burden and a desire to keep backwards compatibility, I've made sure this is an optional configuration option that defaults to being disabled.

Closes #345
Closes #347

Per maintainer desire and to ensure backwards compatibility, this is
disabled by default.

Closes semantic-release#345
Closes semantic-release#347
@pysiekytel
Copy link

@travi is there any way to get this reviewed and merged? That would be helpful

achingbrain added a commit to ipld/js-dag-cbor that referenced this pull request May 12, 2025
Turns out ignoring `.gitignore` while adding files to the release commit is a feature not a bug so specify the list of files to add.

Refs: semantic-release/git#56

We can probably revert if semantic-release/git#527 ever gets merged.
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.

add option ignoreFile to ignore file's contents like .gitignore Why ".gitignore" is ignored ?
2 participants