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

add option ignoreFile to ignore file's contents like .gitignore #347

Open
its-dibo opened this issue Apr 16, 2022 · 2 comments · May be fixed by #527
Open

add option ignoreFile to ignore file's contents like .gitignore #347

its-dibo opened this issue Apr 16, 2022 · 2 comments · May be fixed by #527

Comments

@its-dibo
Copy link

as mentioned in docs the commit will include everything in assets even if it is included in .gitignore.

you can add an option to ignore a file's contents like that

["@semantic-release/git", {
  assets: ["**/*.*"],
  ignoreFile= '.gitignore'
}]

this approach is used by many tools tile eslint and prettier

also, it is a good idea to add an option to include changed files only

@its-dibo its-dibo changed the title use .gitignore to ignore files add option ignoreFile to ignore file's contents like .gitignore Apr 16, 2022
@Kenneth-Sills
Copy link

Kenneth-Sills commented Nov 7, 2024

Since this hasn't been closed or commented on, I have to imagine the maintainers would be okay with this. I'll make a PR for this sometime soon. 😄

For posterity, this is related to #345 (a duplicate) and #55 (when this behavior was added).

To minimize maintenance burden, I'll make a boolean config flag named respectIgnoreFile. All setting it to true will do is drop the --force we send to the git add command.


EDIT: PR Created!

Kenneth-Sills added a commit to Kenneth-Sills/semantic-release-git-plugin that referenced this issue Nov 8, 2024
Per maintainer desire and to ensure backwards compatibility, this is
disabled by default.

Closes semantic-release#345
Closes semantic-release#347
@its-dibo
Copy link
Author

very nice effort @Kenneth-Sills, you saved too many verbose configurations for many developers with this PR

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 a pull request may close this issue.

2 participants