Artifact 6794639c0748de1aabea5bfe18471c72de862a721026094a6f7a6e1f4dd6b976:
- File
cmd/edgesync/main.go
— part of check-in
[176fae9490]
at
2026-04-28 00:00:11
on branch trunk
— release: GoReleaser config + tag-push workflow + edgesync --version
Cross-compile edgesync for darwin/linux × amd64/arm64, archive as tarballs, generate checksums, publish a GitHub release, and update the Homebrew formula at danmestas/homebrew-tap on every git tag matching v*.
Mirrors the bones release pipeline (PRs danmestas/bones#25, #26).
Files: - .goreleaser.yml — build matrix, archive shape, brews stanza pointing at danmestas/homebrew-tap, ldflags for version injection. - .github/workflows/release.yml — runs on tag push, sets up Go 1.26.0, calls goreleaser-action@v6 with `release --clean`. Needs HOMEBREW_PAT_TOKEN secret on this repo (PAT with contents:write on danmestas/homebrew-tap). - cmd/edgesync/main.go — version/commit/date package vars filled by ldflags. `edgesync --version` and `-V` short-circuit before Kong (avoids collision with `repo extract --version` sub-flag).
After merge: 1. Add HOMEBREW_PAT_TOKEN secret to this repo. 2. Tag v0.0.6 and push — release workflow takes it from there. 3. Verify: brew install danmestas/tap/edgesync. (user: [email protected], size: 791) [annotate] [blame] [check-ins using] [more...]
package main import ( "fmt" "os" "github.com/alecthomas/kong" _ "github.com/danmestas/libfossil/db/driver/modernc" ) // Build-time variables, populated via -ldflags by GoReleaser. var ( version = "dev" commit = "none" date = "unknown" ) func main() { // Handle --version / -V at the top level. Done before Kong.Parse so // it doesn't collide with sub-flags like `repo extract --version`. if len(os.Args) == 2 && (os.Args[1] == "--version" || os.Args[1] == "-V") { fmt.Printf("edgesync %s (commit %s, built %s)\n", version, commit, date) return } var c CLI ctx := kong.Parse(&c, kong.Name("edgesync"), kong.Description("EdgeSync — Fossil repo operations, NATS sync, and bridge"), kong.UsageOnError(), ) err := ctx.Run(&c.Globals) ctx.FatalIfErrorf(err) }