Build infrastructure for releases
Some checks failed
release / release (push) Has been cancelled

- Makefile: cross-compile to linux/{amd64,arm64}, darwin/{amd64,arm64},
  windows/amd64 into dist/ with SHA256SUMS. Version is stamped via
  -ldflags '-X main.version=...'.
- .gitea/workflows/release.yml: on tag push (v*) the workflow runs
  `make dist`, creates a Gitea release for the tag and uploads every
  artefact from dist/ via the Gitea API.
- main.go: `rb-search version` / --version prints the stamped version.
- README: new "Готовые бинари" section with curl/Invoke-WebRequest
  install snippets and a checksum-verify hint.
This commit is contained in:
2026-05-26 13:46:16 +05:00
parent 7f9be47039
commit be3251716c
5 changed files with 125 additions and 7 deletions

View File

@@ -11,6 +11,9 @@ import (
"time"
)
// version is overridden at build time via -ldflags '-X main.version=...'.
var version = "dev"
const usage = `rb-search — peek into a RabbitMQ queue without consuming.
Reads N=queue-depth messages with basic.get + manual ack, runs a substring
@@ -72,6 +75,9 @@ func run(args []string) error {
return cmdSetDefault(args[1:])
case "init":
return cmdInit(args[1:])
case "version", "--version", "-V":
fmt.Println(version)
return nil
case "help", "-h", "--help":
fmt.Print(usage)
return nil