-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
71 lines (58 loc) · 1.4 KB
/
Copy pathjustfile
File metadata and controls
71 lines (58 loc) · 1.4 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
default:
@just --list --unsorted
# Run binary slacky via go run
[group('dev')]
slacky *args:
go run ./cmd/slacky {{args}}
# Build the binary
[group('build')]
build:
mkdir -p dist
CGO_ENABLED=0 go build -trimpath -ldflags "-X main.version=dev" -o dist/slacky ./cmd/slacky
# Install the binary into GOBIN, falling back to GOPATH/bin when GOBIN is unset
[group('build')]
install:
#!/usr/bin/env bash
set -euo pipefail
gobin="$(go env GOBIN)"
if [[ -z "$gobin" ]]; then
gobin="$(go env GOPATH)/bin"
fi
mkdir -p "$gobin"
CGO_ENABLED=0 GOBIN="$gobin" go install -trimpath -ldflags "-X main.version=dev" ./cmd/slacky
printf 'installed %s\n' "$gobin/slacky"
# Remove build artifacts
[group('build')]
clean:
rm -rf dist coverage.out
# Run tests
[group('check')]
test:
go test ./...
# Run go vet
[group('check')]
vet:
go vet ./...
# Run golangci-lint
[group('check')]
lint:
golangci-lint run
# Format code
[group('dev')]
fmt:
gofumpt -w .
# Check formatting
[group('check')]
fmt-check:
test -z "$(gofumpt -l .)"
# Run the full local gate
[group('check')]
ci: fmt-check vet lint test smoke
# Run a cheap command matrix with isolated local state
[group('smoke')]
smoke:
./scripts/smoke.sh
# Run authenticated Slack read smoke; set SLACKY_LIVE_SEND=1 to create test messages through slacking
[group('smoke')]
smoke-live:
./scripts/smoke-live.sh