build: add reproducible release bundles
This commit is contained in:
@@ -25,6 +25,9 @@ import (
|
||||
|
||||
const defaultControlSocket = "/run/rvbox/server.sock"
|
||||
|
||||
// buildVersion is set by scripts/release for published artifacts.
|
||||
var buildVersion = "dev"
|
||||
|
||||
func main() {
|
||||
if err := run(os.Args[1:], os.Stdout, os.Stderr); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "rvc:", err)
|
||||
@@ -33,6 +36,10 @@ func main() {
|
||||
}
|
||||
|
||||
func run(args []string, output, diagnostics io.Writer) error {
|
||||
if len(args) == 1 && args[0] == "--version" {
|
||||
_, err := fmt.Fprintln(output, buildVersion)
|
||||
return err
|
||||
}
|
||||
if len(args) == 0 {
|
||||
return errors.New("a command is required (stat or run)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user