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:
3030 # they failed to build.
3131 - go get github.com/mitchellh/gox
3232 - 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`"
3434 # Loop through the built architecture directories and create their corresponding tar.gz archives with the binary in it.
3535 - find releases -maxdepth 2 -mindepth 2 -type f -exec bash -c 'tar -cvzf "$(dirname {}).tar.gz" -C "$(dirname {})" $(basename {})' \;
3636
Original file line number Diff line number Diff line change 11package main
22
33import (
4+ "flag"
5+ "fmt"
6+ "os"
7+
48 "github.com/docker/machine/libmachine/drivers/plugin"
59)
610
11+ // Version will be added once we start the build process via travis-ci
12+ var Version string
13+
714func 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+ }
821 plugin .RegisterDriver (NewDriver ())
922}
You can’t perform that action at this time.
0 commit comments