Skip to content

Commit d81106f

Browse files
committed
Add resolution for dirty version in CI pipeline
1 parent 147abff commit d81106f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -461,3 +461,14 @@ You can use these substitutions in `template`, `dev_template` or `dirty_template
461461
- `{sha}`: First 8 characters of the sha hash of the latest commit
462462

463463
- `{branch}`: Current branch name
464+
465+
466+
## Common issues
467+
468+
### Every version built by CI is `dirty`
469+
470+
This is usually caused by some files created by CI pipeline like build artifacts or test reports, e.g. `dist/my_package.whl` or `reports/unit.xml`.
471+
If they are not mentioned in `.gitignore` file they will be recognized by git as untracked.
472+
Because of that `git status` will report that you have uncommited (dirty) changes in the index, so `setuptools-git-versioning` will detect current version as `dirty`.
473+
474+
You should such files to the `.gitignore` file. See [current repo `.gitignore`](https://github.com/dolfinus/setuptools-git-versioning/blob/master/.gitignore) as an example.

0 commit comments

Comments
 (0)