main / Makefile /
IMAGE := gcr.io/cosmocr-at-upspin/gitweb:latest
build: go build -o bin/gitweb . go build -o bin/git-credential-cosmocr ./cmd/git-credential-cosmocr
helper builds just the git credential helper users install on their
workstations. Override GOOS/GOARCH to cross-compile for other platforms.
helper: go build -o bin/git-credential-cosmocr ./cmd/git-credential-cosmocr
build-linux: mkdir -p bin CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/gitweb .
push: build-linux docker build --platform linux/amd64 -t gitweb -f Dockerfile . docker tag gitweb $(IMAGE) docker push $(IMAGE)
test: go test ./...
run-dev: go run . -dev ./devdata -addr 127.0.0.1:8446
.PHONY: build helper build-linux push test run-dev