-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
31 lines (22 loc) · 772 Bytes
/
justfile
File metadata and controls
31 lines (22 loc) · 772 Bytes
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
version := `jj log --no-graph -r 'latest(::@ & tags())' -T 'tags'`
commit := `jj log -T 'commit_id.short() ++ "\n"' --no-graph | head -n1`
buildDate := `date -u '+%Y-%m-%dT%H:%M:%SZ'`
ldflags := "-s -w -X github.com/soderluk/nirimgr/config.Version=" + version + " -X github.com/soderluk/nirimgr/config.CommitSHA=" + commit + " -X github.com/soderluk/nirimgr/config.BuildDate=" + buildDate
help:
@just --list
version:
@echo {{ version }}
fmt:
go fmt ./...
vet:
go vet ./...
build: fmt vet
@go build -ldflags "{{ ldflags }}" .
install:
@go install -ldflags "{{ ldflags }}"
test:
@go test ./... -coverprofile cover.out
run RUNARGS:
@go run -ldflags "{{ ldflags }}" ./main.go {{ RUNARGS }}
coverage:
@go tool cover -html=cover.out