-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
41 lines (31 loc) · 776 Bytes
/
Justfile
File metadata and controls
41 lines (31 loc) · 776 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
32
33
34
35
36
37
38
39
40
41
set shell := ["bash", "-lc"]
test:
go test ./...
test-race:
go test -race ./...
bench:
scripts/bench_runtime.sh
bench-profile pattern='^BenchmarkExecutionArrayPipeline$':
scripts/bench_profile.sh --pattern "{{pattern}}"
lint:
gofmt -l . | (! read)
golangci-lint run --timeout=10m
repl:
go build -o vibes-cli ./cmd/vibes && ./vibes-cli repl
install dest='':
#!/usr/bin/env bash
set -euo pipefail
dest="{{dest}}"
if [[ -z "$dest" ]]; then
dest="$(go env GOBIN)"
fi
if [[ -z "$dest" ]]; then
dest="$(go env GOPATH)/bin"
fi
mkdir -p "$dest"
GOBIN="$dest" go install ./cmd/vibes
echo "Installed vibes to $dest/vibes"
if [[ ":$PATH:" != *":$dest:"* ]]; then
echo "PATH does not include $dest"
echo "Add it with: export PATH=\"$dest:\$PATH\""
fi