cli/cmd/updater/Makefile
Claude 7bb3488f0e
refactor: flatten commands, extract php/ci variants to own repos
- Remove internal/cmd/php/ (now core/php repo)
- Remove internal/cmd/ci/ and internal/cmd/sdk/ (now core/ci repo)
- Remove internal/variants/ build tag system entirely
- Move all 30 remaining command packages from internal/cmd/ to cmd/
- Rewrite main.go with direct imports (no more variant selection)
- Update all cross-references from internal/cmd/ to cmd/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:41:05 +00:00

40 lines
1 KiB
Makefile

.PHONY: build dev release-local test coverage
BINARY_NAME=updater
CMD_PATH=./cmd/updater
# Default LDFLAGS to empty
LDFLAGS = ""
# If VERSION is set, override LDFLAGS
ifdef VERSION
LDFLAGS = -ldflags "-X 'github.com/snider/updater.Version=$(VERSION)'"
endif
.PHONY: generate
generate:
@echo "Generating code..."
@go generate ./...
build: generate
@echo "Building $(BINARY_NAME)..."
@cd $(CMD_PATH) && go build $(LDFLAGS)
dev: build
@echo "Running $(BINARY_NAME)..."
@$(CMD_PATH)/$(BINARY_NAME) --check-update
release-local:
@echo "Running local release with GoReleaser..."
@~/go/bin/goreleaser release --snapshot --clean
test:
@echo "Running tests..."
@go test ./...
coverage:
@echo "Generating code coverage report..."
@go test -coverprofile=coverage.out ./...
@echo "Coverage report generated: coverage.out"
@echo "To view in browser: go tool cover -html=coverage.out"
@echo "To upload to Codecov, ensure you have the Codecov CLI installed (e.g., 'go install github.com/codecov/codecov-cli@latest') and run: codecov -f coverage.out"