Add dependency management using go deps.

This commit is contained in:
Martin Etmajer
2018-09-20 20:40:28 +02:00
committed by Martin Etmajer
parent 9caa5ecaae
commit f9d040ce56
4 changed files with 84 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
bin
vendor

39
Gopkg.lock generated Normal file
View File

@@ -0,0 +1,39 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ea40c24cdbacd054a6ae9de03e62c5f252479b96c716375aace5c120d68647c8"
name = "github.com/hashicorp/hcl"
packages = [
".",
"hcl/ast",
"hcl/parser",
"hcl/scanner",
"hcl/strconv",
"hcl/token",
"json/parser",
"json/scanner",
"json/token",
]
pruneopts = "UT"
revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241"
version = "v1.0.0"
[[projects]]
digest = "1:5198ae017f3c145a90a2d11cd3ea079c83e1c37cc68af44c8fa5bee201f51ab4"
name = "github.com/tj/docopt"
packages = ["."]
pruneopts = "UT"
revision = "c8470e45692f168e8b380c5d625327e756d7d0a9"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/hashicorp/hcl",
"github.com/hashicorp/hcl/hcl/ast",
"github.com/tj/docopt",
]
solver-name = "gps-cdcl"
solver-version = 1

38
Gopkg.toml Normal file
View File

@@ -0,0 +1,38 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[[constraint]]
name = "github.com/hashicorp/hcl"
version = "1.0.0"
[[constraint]]
name = "github.com/tj/docopt"
version = "1.0.0"
[prune]
go-tests = true
unused-packages = true

View File

@@ -11,10 +11,10 @@ GOBUILD := go build -ldflags "-X main.version=$(VERSION)"
.PHONY: all
all: build
all: deps build
.PHONY: build
build: build-darwin-amd64 build-freebsd-amd64 build-linux-amd64 build-windows-amd64
build: deps build-darwin-amd64 build-freebsd-amd64 build-linux-amd64 build-windows-amd64
build-darwin-amd64:
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o bin/$(NAME)-v$(VERSION)-darwin-amd64
@@ -27,3 +27,7 @@ build-linux-amd64:
build-windows-amd64:
GOOS=windows GOARCH=amd64 $(GOBUILD) -o bin/$(NAME)-v$(VERSION)-windows-amd64
.PHONY: deps
deps:
dep ensure