- 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:
6
main.go
6
main.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user