Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
77 lines (60 loc) · 2.08 KB
/
Copy pathjustfile
File metadata and controls
77 lines (60 loc) · 2.08 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Project task runner. Run `just` to list recipes.
#
# All recipes export GOCACHE to a path inside the repo. The Claude Code
# sandbox blocks writes to ~/Library/Caches/go-build/, so the standard
# cache path doesn't work for in-sandbox test runs. This justfile is the
# single source of truth for that.
export GOCACHE := justfile_directory() + "/.gocache"
# Default: list recipes.
default:
@just --list
# Run every test suite (e2e, TUI, internal packages).
test:
go test ./test/... ./internal/... -count=1
# Run just the e2e CLI harness.
test-e2e:
go test ./test/e2e/ -count=1
# Run just the TUI snapshot harness.
test-tui:
go test ./test/tui/ -count=1
# Run all internal/* tests (domain, storage, usecase, todo, ...).
test-unit:
go test ./internal/... -count=1
# Run one package, e.g. `just test-pkg internal/storage`.
test-pkg pkg:
go test ./{{pkg}}/ -count=1 -v
# Build the htt binary into ./bin/htt.
build:
mkdir -p bin
go build -o bin/htt ./cmd/htt
# Install the htt binary into $GOBIN / $GOPATH/bin.
install:
go install github.com/bricef/htt/cmd/htt
# Static analysis across the module.
vet:
go vet ./...
# Lint with golangci-lint.
check:
golangci-lint run
# Check main is ready to release as VERSION (vX.Y.Z); changes nothing.
release-check version:
scripts/release.sh --check-only {{version}}
# Release main as VERSION with NOTES: check, tag, publish, verify.
release version notes:
scripts/release.sh {{version}} {{notes}}
# Rebuild the binaries of the published release VERSION, and check them.
release-binaries version:
scripts/release.sh --binaries {{version}}
# Build the release archives for tag VERSION into dist/, as releases do.
dist version:
scripts/dist.sh {{version}} dist
# Must be run by the user outside the sandbox the first time after a
# fresh checkout: the sandbox blocks writes to ~/go/pkg/mod/cache/download/.
# (just shows a recipe's last comment line as its description.)
#
# Populate the module cache.
mod-download:
go mod download
# Remove build artifacts and the in-repo Go cache.
clean:
rm -rf bin dist .gocache