mirror of
https://github.com/thegeeklab/drone-matrix.git
synced 2024-06-02 00:09:39 +02:00
fix versioning
This commit is contained in:
parent
d474217ae1
commit
8b0a00a0ce
|
@ -7,6 +7,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/drone-plugins/drone-matrix/plugin"
|
||||
|
@ -16,7 +17,10 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var version = "unknown"
|
||||
var (
|
||||
BuildVersion = "devel"
|
||||
BuildDate = "00000000"
|
||||
)
|
||||
|
||||
func main() {
|
||||
settings := &plugin.Settings{}
|
||||
|
@ -25,10 +29,14 @@ func main() {
|
|||
_ = godotenv.Overload("/run/drone/env")
|
||||
}
|
||||
|
||||
cli.VersionPrinter = func(c *cli.Context) {
|
||||
fmt.Printf("%s version=%s date=%s\n", c.App.Name, c.App.Version, BuildDate)
|
||||
}
|
||||
|
||||
app := &cli.App{
|
||||
Name: "drone-matrix",
|
||||
Usage: "build notifications for matrix",
|
||||
Version: version,
|
||||
Version: BuildVersion,
|
||||
Flags: append(settingsFlags(settings), urfave.Flags()...),
|
||||
Action: run(settings),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user