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

Allow certain files to be dirty #259

Open
awbacker opened this issue Oct 12, 2022 · 0 comments
Open

Allow certain files to be dirty #259

awbacker opened this issue Oct 12, 2022 · 0 comments

Comments

@awbacker
Copy link

awbacker commented Oct 12, 2022

I am looking for a way to allow certain files to be included with the bump command, so they can be part of the versioned commit. I'm thinking of version specific generated artifacts right now, but there are probably other uses cases.

Would something like this be helpful to others?

Current process

The goal is to get a single commit with all files, with the correct subject. That subject is used to trigger steps in the build.

  1. bump version
  2. python gen-summary.py > docs/summary.md
  3. git add docs/summary.md
  4. git commit --amend --no-edit
  5. push

It would be nice to be able to specify directories or specific files that should be included in the commit if they are dirty (or possibly ignored)?

Include these files IF they are dirty, all others are errors

$> bump2version patch \
       --include-if-dirty=docs/*.md \
       --include-if-dirty=docs/favicon.ico

Allow specific dirty files

Allow some files to be dirty if they are ADDed in git. If the modified files are not staged yet, then an error could still be thrown

$> git add docs/summary.md
$> bump2version patch --allow-modified = docs/*.md
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

No branches or pull requests

1 participant