1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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
|