Ensure changelog/unreleased/.gitkeep exists and is staged. After a release the unreleased/ folder may be absent or untracked. Committing a .gitkeep guarantees contributors always find the folder.
(git_root, dry_run=False)
| 157 | |
| 158 | |
| 159 | def ensure_unreleased_gitkeep(git_root, dry_run=False): |
| 160 | """Ensure changelog/unreleased/.gitkeep exists and is staged. |
| 161 | |
| 162 | After a release the unreleased/ folder may be absent or untracked. |
| 163 | Committing a .gitkeep guarantees contributors always find the folder. |
| 164 | """ |
| 165 | gitkeep = git_root / "changelog" / "unreleased" / ".gitkeep" |
| 166 | if not gitkeep.exists(): |
| 167 | print(f" Creating {gitkeep.relative_to(git_root)}") |
| 168 | if not dry_run: |
| 169 | gitkeep.parent.mkdir(parents=True, exist_ok=True) |
| 170 | gitkeep.touch() |
| 171 | |
| 172 | |
| 173 | def run_logchange_generate(gradle_cmd, git_root, dry_run=False): |
no test coverage detected
searching dependent graphs…