Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .buildkite/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions .buildkite/docker-compose.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

checkout_path="${BUILDKITE_BUILD_CHECKOUT_PATH:-$(pwd)}"
cache_root="${checkout_path}/.buildkite/cache-volume"

mkdir -p \
"${cache_root}/go/build" \
"${cache_root}/go/pkg/mod" \
"${cache_root}/golangci-lint"

export GOCACHE="${cache_root}/go/build"
export GOMODCACHE="${cache_root}/go/pkg/mod"
export GOLANGCI_LINT_CACHE="${cache_root}/golangci-lint"
52 changes: 9 additions & 43 deletions .buildkite/pipeline.release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
agents:
queue: hosted

cache: ".buildkite/cache-volume"

steps:
- label: ":terminal: build ({{matrix}})"
matrix:
Expand All @@ -10,53 +12,32 @@ steps:
artifact_paths:
- dist/**/*
secrets:
- MISE_GITHUB_TOKEN
- POSTHOG_API_KEY
- OAUTH_CLIENT_ID
command: 'GOOS="{{matrix}}" .buildkite/release.sh release --clean --split'
plugins:
- docker-compose#v5.12.1:
command:
- .buildkite/release.sh
- release
- --clean
- --split
config: .buildkite/docker-compose.yaml
entrypoint: /bin/sh
env:
- GOOS={{matrix}}
- POSTHOG_API_KEY
- OAUTH_CLIENT_ID
mount-buildkite-agent: true
run: goreleaser
shell: false
tty: true
- buildkite-plugins/mise#v1.1.1: ~

- wait

- label: ":rocket: :package: upload packages ({{matrix}})"
matrix:
- "deb"
- "rpm"
command: '.buildkite/upload-packages.sh "{{matrix}}"'
plugins:
- artifacts#v1.9.4:
download:
- dist/linux/*
- docker-compose#v5.12.1:
command:
- .buildkite/upload-packages.sh
- "{{matrix}}"
config: .buildkite/docker-compose.yaml
entrypoint: /bin/sh
mount-buildkite-agent: true
run: goreleaser
shell: false
tty: true

- label: ":rocket: :github: release"
artifact_paths:
- dist/**/*
env:
AWS_REGION: us-east-1
secrets:
- MISE_GITHUB_TOKEN
- POSTHOG_API_KEY
- OAUTH_CLIENT_ID
plugins:
Expand All @@ -74,20 +55,5 @@ steps:
- artifacts#v1.9.4:
download:
- dist/**/*
- docker-compose#v5.12.1:
command:
- .buildkite/release.sh
- continue
- --merge
config: .buildkite/docker-compose.yaml
entrypoint: /bin/sh
env:
- GITHUB_TOKEN
- DOCKERHUB_USER
- DOCKERHUB_PASSWORD
- POSTHOG_API_KEY
- OAUTH_CLIENT_ID
mount-buildkite-agent: true
run: goreleaser
shell: false
tty: true
- buildkite-plugins/mise#v1.1.1: ~
command: '.buildkite/release.sh continue --merge'
45 changes: 17 additions & 28 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
agents:
queue: hosted

cache: ".buildkite/cache-volume"

steps:
- name: ":golangci-lint: lint"
command: golangci-lint run --verbose --timeout 3m
command: 'golangci-lint run --verbose --timeout 3m'
secrets:
- MISE_GITHUB_TOKEN
plugins:
- docker-compose#v5.12.1:
config: .buildkite/docker-compose.yaml
run: golangci-lint
tty: true
- buildkite-plugins/mise#v1.1.1: ~

- name: ":go: test"
key: test
artifact_paths:
- cover-tree.svg
secrets:
- MISE_GITHUB_TOKEN
commands:
# Hosted agents inject org/token env that breaks config-precedence tests,
# so clear those variables in the command shell right before go test.
- unset BUILDKITE_ORGANIZATION_SLUG BUILDKITE_API_TOKEN
- go test -coverprofile cover.out ./...
- go run github.com/nikolaydubina/go-cover-treemap@latest -coverprofile cover.out > cover-tree.svg
- go-cover-treemap -coverprofile cover.out > cover-tree.svg
- echo '<details><summary>Coverage tree map</summary><img src="artifact://cover-tree.svg" alt="Test coverage tree map" width="70%"></details>' | buildkite-agent annotate --style "info"
plugins:
- docker-compose#v5.12.1:
config: .buildkite/docker-compose.yaml
run: golangci-lint
tty: true
mount-buildkite-agent: true
- buildkite-plugins/mise#v1.1.1: ~

- wait: ~

Expand All @@ -36,26 +39,12 @@ steps:
artifact_paths:
- dist/**/*
secrets:
- MISE_GITHUB_TOKEN
- POSTHOG_API_KEY
- OAUTH_CLIENT_ID
command: 'GOOS="{{matrix}}" .buildkite/release.sh release --clean --snapshot --split'
plugins:
- docker-compose#v5.12.1:
command:
- .buildkite/release.sh
- release
- --clean
- --snapshot
- --split
config: .buildkite/docker-compose.yaml
entrypoint: /bin/sh
env:
- GOOS={{matrix}}
- POSTHOG_API_KEY
- OAUTH_CLIENT_ID
mount-buildkite-agent: true
run: goreleaser
shell: false
tty: true
- buildkite-plugins/mise#v1.1.1: ~

- input: ":package: Create a release?"
prompt: "Select the release type"
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ To get started with contributing, please follow these steps:
* Lint with `mise run lint`.
* Make sure the tests pass with `mise run test`.
* Run `mise run generate` after GraphQL changes. If you need to refresh `schema.graphql`, set `BUILDKITE_GRAPHQL_TOKEN` first.
* If you prefer the containerized lint setup, `docker-compose -f .buildkite/docker-compose.yaml run golangci-lint golangci-lint run` still works.
7. Commit your changes and push them to your forked repository.
8. Submit a pull request with a detailed description of your changes and links to any relevant issues.

Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ mise run generate
go run main.go --help
```

- `mise run build` builds `bk` into `dist/bk`, stamped with `git describe`
- `mise run install` installs `bk` into `$(go env GOBIN)` or `$(go env GOPATH)/bin`
- `mise run install:global` installs `bk` into `~/bin/bk`

`mise.toml` pins Go `1.26.1` to match the current release build image. The
module itself remains compatible with Go `1.25.0` as declared in `go.mod`.
`mise.toml` pins the shared toolchain, including the release helpers used in
CI. The module itself remains compatible with Go `1.25.0` as declared in
`go.mod`.
57 changes: 57 additions & 0 deletions mise.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[[tools."aqua:mvdan/gofumpt"]]
version = "0.9.2"
backend = "aqua:mvdan/gofumpt"
"platforms.linux-arm64" = { checksum = "sha256:5acaa5a554050f55fc81ef02a8b0d14ab6b3c058a84513885286dc52d3451645", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_linux_arm64"}
"platforms.linux-x64" = { checksum = "sha256:72cf61b12fef91eab6df6db4a4284f30616b5ead330112e28a1fa1cb15e57339", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_linux_amd64"}
"platforms.macos-arm64" = { checksum = "sha256:c241fb742599a6cb0563d7377f59def65d451b23dd718dbc6ddf4ab5e695e8f1", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_darwin_arm64"}
"platforms.macos-x64" = { checksum = "sha256:4172b912ec514038605f334fef9ed7b3f12ca3e40024cb0a622eab3073a55e57", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_darwin_amd64"}
"platforms.windows-x64" = { checksum = "sha256:067236b55a8ef4547ddc7d78fbb7a38169de15bab02a1763cde6a132c59dd35c", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_windows_amd64.exe"}

[[tools."github:goreleaser/goreleaser-pro"]]
version = "2.15.2"
backend = "github:goreleaser/goreleaser-pro"
"platforms.linux-arm64" = { checksum = "sha256:cc6cc50a101e7f5cec645503555b39ac330b484513fd30fbf3b18245c57d57bc", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.15.2/goreleaser-pro_Linux_arm64.tar.gz", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/385669235"}
"platforms.linux-x64" = { checksum = "sha256:61baf60a947158bdd5be73b474943483dc97cde5bad99206e999beb2532c4247", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.15.2/goreleaser-pro_Linux_x86_64.tar.gz", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/385669248"}
"platforms.macos-arm64" = { checksum = "sha256:a7cee9cc5fada42d17ee033924535b0e508f654db6f3734e67776b7722c274d1", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.15.2/goreleaser-pro_Darwin_arm64.tar.gz", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/385669138"}
"platforms.macos-x64" = { checksum = "sha256:0399c8f5b895ebb00524d7bd973937afb0f185142b24de40a0c032e13a3482b4", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.15.2/goreleaser-pro_Darwin_x86_64.tar.gz", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/385669136"}
"platforms.windows-x64" = { checksum = "sha256:963d3e6262072d08089cd80caf47123d31e76588c9e847a5eaa44709830eaa93", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.15.2/goreleaser-pro_Windows_x86_64.zip", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/385669379"}

[[tools.go]]
version = "1.26.2"
backend = "core:go"
"platforms.linux-arm64" = { checksum = "sha256:c958a1fe1b361391db163a485e21f5f228142d6f8b584f6bef89b26f66dc5b23", url = "https://dl.google.com/go/go1.26.2.linux-arm64.tar.gz"}
"platforms.linux-x64" = { checksum = "sha256:990e6b4bbba816dc3ee129eaeaf4b42f17c2800b88a2166c265ac1a200262282", url = "https://dl.google.com/go/go1.26.2.linux-amd64.tar.gz"}
"platforms.macos-arm64" = { checksum = "sha256:32af1522bf3e3ff3975864780a429cc0b41d190ec7bf90faa661d6d64566e7af", url = "https://dl.google.com/go/go1.26.2.darwin-arm64.tar.gz"}
"platforms.macos-x64" = { checksum = "sha256:bc3f1500d9968c36d705442d90ba91addf9271665033748b82532682e90a7966", url = "https://dl.google.com/go/go1.26.2.darwin-amd64.tar.gz"}
"platforms.windows-x64" = { checksum = "sha256:98eb3570bade15cb826b0909338df6cc6d2cf590bc39c471142002db3832b708", url = "https://dl.google.com/go/go1.26.2.windows-amd64.zip"}

[[tools."go:github.com/nikolaydubina/go-cover-treemap"]]
version = "1.5.1"
backend = "go:github.com/nikolaydubina/go-cover-treemap"

[[tools.golangci-lint]]
version = "2.11.4"
backend = "aqua:golangci/golangci-lint"
"platforms.linux-arm64" = { checksum = "sha256:3bcfa2e6f3d32b2bf5cd75eaa876447507025e0303698633f722a05331988db4", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.4/golangci-lint-2.11.4-linux-arm64.tar.gz"}
"platforms.linux-x64" = { checksum = "sha256:200c5b7503f67b59a6743ccf32133026c174e272b930ee79aa2aa6f37aca7ef1", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.4/golangci-lint-2.11.4-linux-amd64.tar.gz"}
"platforms.macos-arm64" = { checksum = "sha256:02db2a2dae8b26812e53b0688a6f617e3ef1f489790e829ea22862cf76945675", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.4/golangci-lint-2.11.4-darwin-arm64.tar.gz"}
"platforms.macos-x64" = { checksum = "sha256:c900d4048db75d1edfd550fd11cf6a9b3008e7caa8e119fcddbc700412d63e60", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.4/golangci-lint-2.11.4-darwin-amd64.tar.gz"}
"platforms.windows-x64" = { checksum = "sha256:4932cfca5e75bf60fe1c576edf459e5e809e6644664a068185d64b84af3fad9e", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.4/golangci-lint-2.11.4-windows-amd64.zip"}

[[tools.ko]]
version = "0.18.1"
backend = "aqua:ko-build/ko"
"platforms.linux-arm64" = { checksum = "sha256:9a26698876892128952fa3d038a4e99bea961d0d225865c60474b79e3db12e99", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Linux_arm64.tar.gz"}
"platforms.linux-x64" = { checksum = "sha256:048ab11818089a43b7b74bc554494a79a3fd0d9822c061142e5cd3cf8b30cb27", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Linux_x86_64.tar.gz"}
"platforms.macos-arm64" = { checksum = "sha256:752a639e0fbc013a35a43974b5ed87e7008bc2aee4952dfd2cc19f0013205492", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Darwin_arm64.tar.gz"}
"platforms.macos-x64" = { checksum = "sha256:0e0dd8fddbefebb8572ece4dca8f07a7472de862fedd7e9845fd9d651e0d5dbe", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Darwin_x86_64.tar.gz"}
"platforms.windows-x64" = { checksum = "sha256:d15c5e391279a2222d4d659ac53047e08d70e21fea54b2133f0a5c25a1f1f694", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Windows_x86_64.tar.gz"}

[[tools.lefthook]]
version = "2.1.5"
backend = "aqua:evilmartians/lefthook"
"platforms.linux-arm64" = { checksum = "sha256:0823d67541e34d4530d678a9492dba8e1edcfc19cbdbc6d28014cb97a8522c36", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.5/lefthook_2.1.5_Linux_aarch64.gz"}
"platforms.linux-x64" = { checksum = "sha256:0faf5a547afbcedc3f2e9bef46053a73bcbfc2478e47d39bde30784e08f97190", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.5/lefthook_2.1.5_Linux_x86_64.gz"}
"platforms.macos-arm64" = { checksum = "sha256:f3aeef5fc287c6619a2f043ce3199e514bfc0639739be393a3759dd4470ee292", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.5/lefthook_2.1.5_MacOS_arm64.gz"}
"platforms.macos-x64" = { checksum = "sha256:27e48734de8f632e64fff07e8ae9f82514713b9f77e7bf91d8925ef1ea59a901", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.5/lefthook_2.1.5_MacOS_x86_64.gz"}
"platforms.windows-x64" = { checksum = "sha256:bf14d028984d24a72887f4f73d8899f5879c11786f4ba79a81c676fb3cefce1e", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.5/lefthook_2.1.5_Windows_x86_64.gz"}
10 changes: 8 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Pinned local toolchain for contributors. The Go version matches the
# repository's current release build image; the module minimum stays in go.mod.
# CI and release toolchain; the module minimum stays in go.mod.
[settings]
experimental = true
lockfile = true

[tools]
go = "1.26.2"
golangci-lint = "2.11.4"
lefthook = "2.1.5"
"aqua:mvdan/gofumpt" = "0.9.2"
"aqua:goreleaser/goreleaser" = "2.15.2"
"go:github.com/nikolaydubina/go-cover-treemap" = "1.5.1"
"github:goreleaser/goreleaser-pro" = "2.15.2"
ko = "0.18.1"

[tasks.format]
description = "Format Go files with gofumpt"
Expand Down