Something went wrong. Try again.
A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io
docker container atproto go
Something went wrong. Try again.
at-container-registry Makefile
2.6 kB · 84 lines
Makefile
at test
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485# ATCR Makefile# Build targets for the ATProto Container Registry
.PHONY: all build build-appview build-hold build-credential-helper build-oauth-helper \ generate test test-race test-verbose lint clean help
.DEFAULT_GOAL := help
help: ## Show this help message @echo "ATCR Build Targets:" @echo "" @awk 'BEGIN {FS = ":.*##"; printf ""} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-28s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
all: generate build ## Generate assets and build all binaries (default)
# Generated asset filesGENERATED_ASSETS = \ pkg/appview/static/js/htmx.min.js \ pkg/appview/static/js/lucide.min.js \ pkg/appview/licenses/spdx-licenses.json
generate: $(GENERATED_ASSETS) ## Run go generate to download vendor assets
$(GENERATED_ASSETS): @echo "→ Generating vendor assets and code..." go generate ./...
##@ Build Targets
build: build-appview build-hold build-credential-helper ## Build all binaries
build-appview: $(GENERATED_ASSETS) ## Build appview binary only @echo "→ Building appview..." @mkdir -p bin go build -o bin/atcr-appview ./cmd/appview
build-hold: $(GENERATED_ASSETS) ## Build hold binary only @echo "→ Building hold..." @mkdir -p bin go build -o bin/atcr-hold ./cmd/hold
build-credential-helper: $(GENERATED_ASSETS) ## Build credential helper only @echo "→ Building credential helper..." @mkdir -p bin go build -o bin/docker-credential-atcr ./cmd/credential-helper
build-oauth-helper: $(GENERATED_ASSETS) ## Build OAuth helper only @echo "→ Building OAuth helper..." @mkdir -p bin go build -o bin/oauth-helper ./cmd/oauth-helper
##@ Test Targets
test: ## Run all tests @echo "→ Running tests..." go test -cover ./...
test-race: ## Run tests with race detector @echo "→ Running tests with race detector..." go test -race ./...
test-verbose: ## Run tests with verbose output @echo "→ Running tests with verbose output..." go test -v ./...
##@ Quality Targets
.PHONY: check-golangci-lintcheck-golangci-lint: @which golangci-lint > /dev/null || (echo "→ Installing golangci-lint..." && go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)
lint: check-golangci-lint ## Run golangci-lint @echo "→ Running golangci-lint..." golangci-lint run ./...
##@ Utility Targets
clean: ## Remove built binaries and generated assets @echo "→ Cleaning build artifacts..." rm -rf bin/ rm -f pkg/appview/static/js/htmx.min.js rm -f pkg/appview/static/js/lucide.min.js rm -f pkg/appview/licenses/spdx-licenses.json @echo "✓ Clean complete"