File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ before_deploy:
30
30
# they failed to build.
31
31
- go get github.com/mitchellh/gox
32
32
- mkdir releases
33
- - gox -osarch='!netbsd/arm !openbsd/386 !openbsd/amd64 !netbsd/386 !netbsd/amd64' -output="releases/{{.Dir}}_`git describe --tags --abbrev=0`_{{.OS}}_{{.Arch}}/{{.Dir}}"
33
+ - gox -osarch='!netbsd/arm !openbsd/386 !openbsd/amd64 !netbsd/386 !netbsd/amd64' -output="releases/{{.Dir}}_`git describe --tags --abbrev=0`_{{.OS}}_{{.Arch}}/{{.Dir}}" -ldflags "-X main.Version=`git describe --tags --abbrev=0`"
34
34
# Loop through the built architecture directories and create their corresponding tar.gz archives with the binary in it.
35
35
- find releases -maxdepth 2 -mindepth 2 -type f -exec bash -c 'tar -cvzf "$(dirname {}).tar.gz" -C "$(dirname {})" $(basename {})' \;
36
36
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
+ "flag"
5
+ "fmt"
6
+ "os"
7
+
4
8
"github.com/docker/machine/libmachine/drivers/plugin"
5
9
)
6
10
11
+ // Version will be added once we start the build process via travis-ci
12
+ var Version string
13
+
7
14
func main () {
15
+ version := flag .Bool ("v" , false , "prints current docker-machine-driver-hetzner version" )
16
+ flag .Parse ()
17
+ if * version {
18
+ fmt .Printf ("Version: %s\n " , Version )
19
+ os .Exit (0 )
20
+ }
8
21
plugin .RegisterDriver (NewDriver ())
9
22
}
You can’t perform that action at this time.
0 commit comments