mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
After tests + image publish, a release job bumps the tag via conventional commits (github-tag-action, default_bump=false so docs/chore merges skip releasing), retags :main images in GHCR as semver+latest (tag pushes via GITHUB_TOKEN do not retrigger CI), cross-compiles the CLI for 5 platforms, and cuts a GitHub Release with generated notes and checksums. Manual v* tag pushes get the same release treatment. CLI --version now reports the tag via the previously dead -X ldflags. Authored By: TDvorak <[email protected]> Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
23 lines
392 B
Go
23 lines
392 B
Go
package main
|
|
|
|
import (
|
|
"containr/internal/cli"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
// Injected at build time via -ldflags (see scripts/build-cli.sh).
|
|
var (
|
|
Version = "dev"
|
|
BuildTime = "unknown"
|
|
GitCommit = "unknown"
|
|
)
|
|
|
|
func main() {
|
|
cli.SetVersion(fmt.Sprintf("%s (%s, %s)", Version, GitCommit, BuildTime))
|
|
if err := cli.Run(); err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|