Skip to content

Commit 5b0c9d4

Browse files
turbomamclaude
andcommitted
fix: Add _version.py to .gitignore and handle in workflow
- Add src/weather_mcp/_version.py to .gitignore - Remove _version.py from git tracking (should be generated) - Add git update-index --skip-worktree in workflow to prevent dirty state - Resolves version mismatch caused by modified version file during build 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 891a262 commit 5b0c9d4

3 files changed

Lines changed: 7 additions & 22 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ jobs:
5858
run: uv tool install hatch
5959

6060
- name: Build package with hatch
61-
run: hatch build
61+
run: |
62+
# Tell git to ignore version file changes during build
63+
git update-index --skip-worktree src/weather_mcp/_version.py || true
64+
hatch build
6265
6366
- name: Check package
6467
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ cython_debug/
191191
# Ruff stuff:
192192
.ruff_cache/
193193

194+
# hatch-vcs generated version file
195+
src/weather_mcp/_version.py
196+
194197
# PyPI configuration file
195198
.pypirc
196199

src/weather_mcp/_version.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)