7 sh: git describe --long 2>/dev/null || echo ""
9 sh: test -f race.log && echo "1" || echo ""
13 GOEXPERIMENT: greenteagc
17 desc: Install golangci-lint
19 - go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
24 desc: Run base linters
27 - golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m
32 desc: Check that log messages start with capital letters
34 - ./scripts/check_log_capitalization.sh
37 desc: Run base linters and fix issues
39 - golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m --fix
46 LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}'
48 - "go build -v {{if .RACE}}-race{{end}} {{.LDFLAGS}} ."
59 - "./crush{{exeExt}} {{.CLI_ARGS}} {{if .RACE}}2>race.log{{end}}"
62 desc: Run build with local Catwalk
64 CATWALK_URL: http://localhost:8080
67 - ./crush{{exeExt}} {{.CLI_ARGS}}
70 desc: Run build with custom config to test onboarding
72 CRUSH_GLOBAL_DATA: tmp/onboarding/data
73 CRUSH_GLOBAL_CONFIG: tmp/onboarding/config
76 - rm -rf tmp/onboarding
77 - ./crush{exeExt} {{.CLI_ARGS}}
82 - go test -race -failfast ./... {{.CLI_ARGS}}
85 desc: Run tests and record all VCR cassettes again
88 - rm -r internal/agent/testdata
89 - go test -v -count=1 -timeout=1h ./internal/agent
97 desc: Run prettier on HTML/CSS/JS files
99 - prettier --write internal/cmd/stats/index.html internal/cmd/stats/index.css internal/cmd/stats/index.js
104 - go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix -test ./...
107 desc: Run with profiling enabled
114 desc: Install the application
116 LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}'
119 - go install {{.LDFLAGS}} -v .
125 desc: 10s CPU profile
127 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/profile?seconds=10'
132 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/heap'
135 desc: Allocations profile
137 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/allocs'
140 desc: Generate JSON schema for configuration
142 - go run main.go schema > schema.json
143 - echo "Generated schema.json"
148 desc: Update Hyper embedded provider.json
150 - go generate ./internal/agent/hyper/...
152 - ./internal/agent/hyper/provider.json
155 desc: Create and push a new tag following semver
158 sh: svu next --always || go run github.com/caarlos0/svu/v3@latest next --always
159 prompt: "This will release {{.NEXT}}. Continue?"
161 - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]'
162 msg: Not on main branch
163 - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
165 - sh: 'gh run list --workflow build.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
166 msg: "Test build for this commit failed or not present"
167 - sh: 'gh run list --workflow snapshot.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
168 msg: "Snapshot build for this commit failed or not present"
171 - git commit --allow-empty -m "{{.NEXT}}"
172 - git tag --annotate --sign -m "{{.NEXT}}" {{.NEXT}} {{.CLI_ARGS}}
173 - echo "Pushing {{.NEXT}}..."
174 - git push origin main --follow-tags
178 - git tag -d nightly || true
182 desc: Update Fantasy and Catwalk
184 # The Go proxy takes a bit of time to see the latest release. Setting
185 # these bypass it to ensure we can update to a release from a minute ago.
187 GONOSUMDB: charm.land/*
189 - go get charm.land/fantasy@latest
190 - go get charm.land/catwalk@latest
194 desc: Generate code using SQLC
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list