build: add reproducible release bundles
This commit is contained in:
@@ -26,12 +26,22 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// buildVersion is set by scripts/release for published artifacts. Development
|
||||
// and test builds intentionally retain the explicit non-release value.
|
||||
var buildVersion = "dev"
|
||||
|
||||
func main() {
|
||||
var configPath string
|
||||
var checkConfig bool
|
||||
var version bool
|
||||
flag.StringVar(&configPath, "config", "", "absolute server TOML configuration path")
|
||||
flag.BoolVar(&checkConfig, "check-config", false, "validate server configuration and exit")
|
||||
flag.BoolVar(&version, "version", false, "print build version and exit")
|
||||
flag.Parse()
|
||||
if version {
|
||||
fmt.Fprintln(os.Stdout, buildVersion)
|
||||
return
|
||||
}
|
||||
if configPath == "" {
|
||||
log.Print("rvbox-server: --config is required")
|
||||
os.Exit(2)
|
||||
|
||||
Reference in New Issue
Block a user