Skip to content
This repository has been archived by the owner on Jan 17, 2018. It is now read-only.

Get version info automatically from git env #58

Merged
merged 1 commit into from
Aug 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ install:
- export GO15VENDOREXPERIMENT=1
before_script:
- go get -u github.com/golang/lint/golint
go: 1.5
- go get -u github.com/ahmetalpbalkan/govvv
go: 1.7
script:
- test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
- test -z "$(golint . | tee /dev/stderr)"
- go vet .
- GOOS=linux GOARCH=amd64 go build -v -o bin/azurefile-dockervolumedriver .
- GOOS=linux GOARCH=amd64 govvv build -v -o bin/azurefile-dockervolumedriver .
- go list ./... | grep -v '/vendor/' | xargs go test -v
deploy:
provider: releases
Expand Down
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ const (
metadataRoot = "/etc/docker/plugins/azurefile/volumes"
)

var (
// GitSummary is provided at compile-time when built with govvv.
// If the source tree corresponds to a tag, the tag name is used.
// Otherwise, provides a string summarizing the state of git tree.
GitSummary string
)

func main() {
cmd := cli.NewApp()
cmd.Name = "azurefile-dockervolumedriver"
cmd.Version = "0.2.1"
cmd.Version = GitSummary
cmd.Usage = "Docker Volume Driver for Azure File Service"
cli.AppHelpTemplate = usageTemplate

Expand Down