## Summary - Extract PHP/Laravel commands to `core/php` repo (42 files, standalone module) - Extract CI/release + SDK commands to `core/ci` repo (10 files) - Remove `internal/variants/` build tag system entirely - Move all 30 remaining command packages from `internal/cmd/` to top-level `cmd/` - Rewrite `main.go` with direct imports — no more variant selection - PHP and CI are now optional via commented import lines in main.go Co-authored-by: Claude <developers@lethean.io> Reviewed-on: #2 Co-authored-by: Charon <charon@lthn.ai> Co-committed-by: Charon <charon@lthn.ai>
40 lines
1 KiB
Makefile
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"
|