~bigbes/ci-cacher

ref: d041811523ea4e4dc5aeb636ab3c252c19a3b5b8 ci-cacher/Justfile -rw-r--r-- 852 bytes
d0418115 — Eugene Blikh cacher: add 'docker download --pull' and silence cobra usage on errors a day ago
                                                                                
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
28
29
30
31
32
binary_name := "cacher"
version := `git describe --long 2>/dev/null || cat VERSION 2>/dev/null || echo dev`

default:
    @just --list

build:
    go build -ldflags "-X go.bigb.es/cacher/internal/version.version={{version}}" -o {{binary_name}} .

build-static:
    CGO_ENABLED=0 go build -ldflags "-s -w -X go.bigb.es/cacher/internal/version.version={{version}}" -o {{binary_name}} .

build-linux:
    GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w -X go.bigb.es/cacher/internal/version.version={{version}}" -o {{binary_name}}-linux-amd64 .

install:
    go install -ldflags "-X go.bigb.es/cacher/internal/version.version={{version}}" .

test:
    go test ./...

test-e2e:
    go test -tags=e2e -timeout=5m -v ./...

lint:
    golangci-lint run ./...

tidy:
    go mod tidy

clean:
    rm -f {{binary_name}} {{binary_name}}-linux-amd64