Skip to content

Commit d875ea9

Browse files
committed
fix: exclude go.work files from uncommitted changes check in release scripts
1 parent cab55dc commit d875ea9

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

scripts/release-prep.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ echo ""
2323

2424
cd "$PROJECT_ROOT"
2525

26-
# Verify no uncommitted changes
27-
if [ -n "$(git status --porcelain)" ]; then
26+
# Verify no uncommitted changes (excluding go.work files which are git-ignored)
27+
UNCOMMITTED=$(git status --porcelain | grep -v "go.work" || true)
28+
if [ -n "$UNCOMMITTED" ]; then
2829
echo "❌ Error: You have uncommitted changes. Please commit or stash them first."
30+
echo "$UNCOMMITTED"
2931
exit 1
3032
fi
3133

scripts/release.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ if [ "$LOCAL" != "$REMOTE" ]; then
7474
fi
7575
log_success "Main is up to date"
7676

77-
# Check 3: Verify no uncommitted changes
77+
# Check 3: Verify no uncommitted changes (excluding go.work files which are git-ignored)
7878
log_info "Checking for uncommitted changes..."
79-
if [ -n "$(git status --porcelain)" ]; then
79+
UNCOMMITTED=$(git status --porcelain | grep -v "go.work" || true)
80+
if [ -n "$UNCOMMITTED" ]; then
8081
log_error "Uncommitted changes detected:"
81-
git status --short
82+
echo "$UNCOMMITTED"
8283
log_info "Commit or stash changes before releasing"
8384
exit 1
8485
fi

0 commit comments

Comments
 (0)