Skip to content

Commit ce0cb84

Browse files
committed
fix: include uv.lock in release commits
- Sync uv environment before committing so uv.lock changes are included - Add proper rollback for uv.lock on abort - Update commit message to reflect both pyproject.toml and uv.lock changes
1 parent 49ac29f commit ce0cb84

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

scripts/release.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ echo -e "${GREEN}New version: ${NEW_VERSION}${NC}"
156156
# Update version in pyproject.toml
157157
update_version "$NEW_VERSION"
158158

159-
# Sync environment
159+
# Sync environment BEFORE committing so uv.lock is included
160160
echo -e "${YELLOW}Syncing installed package version...${NC}"
161161
if command -v uv >/dev/null 2>&1; then
162162
uv sync
@@ -166,7 +166,7 @@ fi
166166

167167
# Confirm with user
168168
echo -e "${YELLOW}This will:${NC}"
169-
echo " 1. Commit the version change"
169+
echo " 1. Commit the version change and updated uv.lock"
170170
echo " 2. Create tag v${NEW_VERSION}"
171171
echo " 3. Push to origin with tags"
172172
echo " 4. Trigger the build pipeline"
@@ -177,12 +177,19 @@ echo
177177
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
178178
echo -e "${YELLOW}Aborted. Reverting version change...${NC}"
179179
update_version "$CURRENT_VERSION"
180+
# Also revert uv.lock if it exists
181+
if command -v uv >/dev/null 2>&1; then
182+
uv sync # Restore original uv.lock
183+
fi
180184
exit 0
181185
fi
182186

183-
# Commit version bump
187+
# Commit version bump (including uv.lock)
184188
echo -e "${YELLOW}Committing version bump...${NC}"
185189
git add pyproject.toml
190+
if [[ -f "uv.lock" ]]; then
191+
git add uv.lock
192+
fi
186193
git commit -m "Bump version to ${NEW_VERSION}"
187194

188195
# Create and push tag

0 commit comments

Comments
 (0)