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}} ."
52 - internal/agent/**/*.md
53 - internal/agent/**/*.md.tpl
54 - internal/agent/hyper/provider.json
62 - "./crush{{exeExt}} {{.CLI_ARGS}} {{if .RACE}}2>race.log{{end}}"
65 desc: Run build with local Catwalk
67 CATWALK_URL: http://localhost:8080
70 - ./crush{{exeExt}} {{.CLI_ARGS}}
73 desc: Run build with custom config to test onboarding
75 CRUSH_GLOBAL_DATA: tmp/onboarding/data
76 CRUSH_GLOBAL_CONFIG: tmp/onboarding/config
79 - rm -rf tmp/onboarding
80 - ./crush{{exeExt}} {{.CLI_ARGS}}
85 - go test -race -failfast ./... {{.CLI_ARGS}}
88 desc: Run tests and record all VCR cassettes again
91 - rm -r internal/agent/testdata
92 - go test -v -count=1 -timeout=1h ./internal/agent
100 desc: Run prettier on HTML/CSS/JS files
102 - prettier --write internal/cmd/stats/index.html internal/cmd/stats/index.css internal/cmd/stats/index.js
107 - go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix -test ./...
110 desc: Run with profiling enabled
117 desc: Install the application
119 LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}'
122 - go install {{.LDFLAGS}} -v .
126 - internal/agent/**/*.md
127 - internal/agent/**/*.md.tpl
128 - internal/agent/hyper/provider.json
131 desc: 10s CPU profile
133 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/profile?seconds=10'
138 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/heap'
141 desc: Allocations profile
143 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/allocs'
146 desc: Generate JSON schema for configuration
148 - go run main.go schema > schema.json
149 - echo "Generated schema.json"
154 desc: Update Hyper embedded provider.json
156 - go generate ./internal/agent/hyper/...
158 - ./internal/agent/hyper/provider.json
161 desc: Create and push a new tag following semver
164 sh: svu next --always || go run github.com/caarlos0/svu/v3@latest next --always
165 prompt: "This will release {{.NEXT}}. Continue?"
167 - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]'
168 msg: Not on main branch
169 - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
171 - sh: 'gh run list --workflow build.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
172 msg: "Test build for this commit failed or not present"
173 - sh: 'gh run list --workflow snapshot.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
174 msg: "Snapshot build for this commit failed or not present"
177 - git commit --allow-empty -m "{{.NEXT}}"
178 - git tag --annotate --sign -m "{{.NEXT}}" {{.NEXT}} {{.CLI_ARGS}}
179 - echo "Pushing {{.NEXT}}..."
180 - git push origin main --follow-tags
184 - git tag -d nightly || true
188 desc: Update Fantasy and Catwalk
190 # The Go proxy takes a bit of time to see the latest release. Setting
191 # these bypass it to ensure we can update to a release from a minute ago.
193 GONOSUMDB: charm.land/*
195 - go get charm.land/fantasy@latest
196 - go get charm.land/catwalk@latest
200 desc: Generate OpenAPI spec from swag annotations
202 - go run github.com/swaggo/swag/cmd/swag@v1.16.6 init --generalInfo main.go --dir . --output internal/swagger --packageName swagger --parseDependency --parseInternal --parseDepth 5
204 - internal/server/*.go
205 - internal/proto/*.go
208 - internal/swagger/docs.go
209 - internal/swagger/swagger.json
210 - internal/swagger/swagger.yaml
213 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