From be2ac1624c86354b1826d67003d35b0985e612da Mon Sep 17 00:00:00 2001 From: Frederic Lemoine Date: Tue, 9 Jan 2018 13:56:44 +0100 Subject: [PATCH] Added package dependencies with dep --- .gitignore | 2 ++ .travis.yml | 13 +------------ Gopkg.toml | 24 +----------------------- Makefile | 6 +++++- io/nexus/nexus_parser_test.go | 5 +++-- 5 files changed, 12 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index b25c15b..e92965d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *~ +Gopkg.lock +vendor diff --git a/.travis.yml b/.travis.yml index ae29a29..59b015e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,7 @@ language: go go: - - 1.6.4 - - 1.7.4 - - 1.8 - 1.9.2 install: - - go get -u github.com/fredericlemoine/bitset - - go get -u github.com/fredericlemoine/gostats - - go get -u github.com/fredericlemoine/goalign - - go get -u github.com/spf13/cobra - - go get -u github.com/golang/freetype/truetype - - go get -u github.com/llgcode/draw2d - - go get -u golang.org/x/image/font - - go get -u github.com/ajstarks/svgo - - go get -u github.com/jlaffaye/ftp + - go get -u github.com/golang/dep/cmd/dep diff --git a/Gopkg.toml b/Gopkg.toml index 0840a98..f5a78bf 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -1,25 +1,3 @@ -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# 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" - - [[constraint]] branch = "master" name = "github.com/ajstarks/svgo" @@ -30,7 +8,7 @@ [[constraint]] name = "github.com/fredericlemoine/goalign" - version = "0.2.4" + version = "0.2.5" [[constraint]] name = "github.com/fredericlemoine/gostats" diff --git a/Makefile b/Makefile index e744f28..10d4967 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +DEP_EXECUTABLE := dep GO_EXECUTABLE := go VERSION := $(shell git describe --abbrev=10 --dirty --always --tags) DIST_DIRS := find * -type d -exec @@ -5,7 +6,10 @@ VERSION_PACKAGE := github.com/fredericlemoine/gotree/cmd.Version NAME := gotree PACKAGE:=github.com/fredericlemoine/gotree -all: build test install testcommands +all: dep build test install testcommands + +dep: + ${DEP_EXECUTABLE} ensure build: ${GO_EXECUTABLE} build -o ${NAME} -ldflags "-X ${VERSION_PACKAGE}=${VERSION}" ${PACKAGE} diff --git a/io/nexus/nexus_parser_test.go b/io/nexus/nexus_parser_test.go index 1a8edb3..148cef5 100644 --- a/io/nexus/nexus_parser_test.go +++ b/io/nexus/nexus_parser_test.go @@ -1,10 +1,11 @@ package nexus_test import ( - "github.com/fredericlemoine/gotree/io/nexus" - "github.com/fredericlemoine/gotree/tree" "strings" "testing" + + "github.com/fredericlemoine/gotree/io/nexus" + "github.com/fredericlemoine/gotree/tree" ) // Ensure the parser can parse strings into Statement ASTs.