Skip to content

Commit 43c8e4b

Browse files
committed
feat: add goreleaser version management and improve release commands with installation checks
1 parent 7a4cb21 commit 43c8e4b

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.goreleaser.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
version: 2
44

5+
project_name: claude-mux
6+
57
before:
68
hooks:
79
- go mod tidy
@@ -43,9 +45,10 @@ archives:
4345
{{- else if eq .Arch "386" }}i386
4446
{{- else }}{{ .Arch }}{{ end }}
4547
{{- if .Arm }}v{{ .Arm }}{{ end }}
48+
formats: [ 'tar.gz' ]
4649
format_overrides:
4750
- goos: windows
48-
format: zip
51+
formats: [ 'zip' ]
4952
files:
5053
- README.md
5154
- LICENSE

Makefile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ GOIMPORTS_VERSION := v0.36.0
1111
GOLANGCI_VERSION := v2.4.0
1212
GOTESTSUM_VERSION := v1.12.3
1313
GOSEC_VERSION := v2.22.8
14+
GORELEASER_VERSION=v2.11.2
1415

1516
# Install development dependencies
1617
dev-deps:
@@ -19,6 +20,7 @@ dev-deps:
1920
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_VERSION)
2021
go install gotest.tools/gotestsum@$(GOTESTSUM_VERSION)
2122
go install github.com/securego/gosec/v2/cmd/gosec@$(GOSEC_VERSION)
23+
go install github.com/goreleaser/goreleaser/v2@${GORELEASER_VERSION}
2224
@echo "Development dependencies installed!"
2325

2426
# Build the binary
@@ -80,11 +82,21 @@ check: fmt vet lint security test
8082

8183
# Test release with goreleaser
8284
release-dry:
83-
goreleaser release --snapshot --clean
85+
@if command -v goreleaser > /dev/null; then \
86+
goreleaser release --snapshot --clean; \
87+
else \
88+
echo "goreleaser not installed. Run 'make dev-deps' first"; \
89+
exit 1; \
90+
fi
8491

8592
# Create a new release (requires tag)
8693
release:
87-
goreleaser release --clean
94+
@if command -v goreleaser > /dev/null; then \
95+
goreleaser release --clean; \
96+
else \
97+
echo "goreleaser not installed. Run 'make dev-deps' first"; \
98+
exit 1; \
99+
fi
88100

89101
# Run the binary
90102
run: build

0 commit comments

Comments
 (0)