Skip to content

Commit 44d88ff

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
improved tagging
1 parent b7d3cba commit 44d88ff

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ tag:
77
echo "ERROR: VERSION is required. Usage: make tag VERSION=v1.2.3"; \
88
exit 1; \
99
fi
10-
@echo "Tagging all modules with $(VERSION)..."
10+
@echo "=== Releasing $(VERSION) ==="
11+
@echo ""
12+
@echo "Step 1: Update go.mod to require pkg/persist $(VERSION)..."
13+
@sed -i '' 's|github.com/codeGROOVE-dev/sfcache/pkg/persist v[^ ]*|github.com/codeGROOVE-dev/sfcache/pkg/persist $(VERSION)|' go.mod
14+
@echo ""
15+
@echo "Step 2: Commit go.mod changes..."
16+
@git add go.mod
17+
@git commit -m "Release $(VERSION)" || echo " (no changes to commit)"
18+
@echo ""
19+
@echo "Step 3: Create tags..."
1120
@git tag -a $(VERSION) -m "$(VERSION)"
1221
@find . -name go.mod -not -path "./go.mod" | while read mod; do \
1322
dir=$$(dirname $$mod); \
@@ -16,10 +25,13 @@ tag:
1625
git tag -a $$dir/$(VERSION) -m "$(VERSION)"; \
1726
done
1827
@echo ""
19-
@echo "Created tags:"
20-
@git tag -l "$(VERSION)" "*/$(VERSION)" | sed 's/^/ /'
28+
@echo "Step 4: Push commit and tags..."
29+
@git push origin main
30+
@git push origin --tags
2131
@echo ""
22-
@echo "To push tags, run: git push origin --tags"
32+
@echo "=== Release $(VERSION) complete ==="
33+
@echo "Tags pushed:"
34+
@git tag -l "$(VERSION)" "*/$(VERSION)" | sed 's/^/ /'
2335

2436
test:
2537
@echo "Running tests in all modules..."

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github.com/codeGROOVE-dev/sfcache/pkg/persist v1.1.3 h1:mlNbUzAXXCiIqUYqU0BhqbHNt93IB6NT/tLoENcEDHk=
2+
github.com/codeGROOVE-dev/sfcache/pkg/persist v1.1.3/go.mod h1:5D7qOtzUK/FgzBCjdaQa7r5i/sizbZH/grEcq+kGntY=

0 commit comments

Comments
 (0)