From 3d4eb09b70f5d3241a5b34264943cb86d79589d6 Mon Sep 17 00:00:00 2001 From: kpacha Date: Sat, 7 Apr 2018 13:17:13 +0200 Subject: [PATCH 1/2] dep added --- .gitignore | 8 +----- .travis.yml | 2 +- Gopkg.lock | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Gopkg.toml | 42 ++++++++++++++++++++++++++++ Makefile | 19 +++++++++++-- 5 files changed, 139 insertions(+), 11 deletions(-) create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml diff --git a/.gitignore b/.gitignore index 4b036ca51..5ce645a60 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,4 @@ -**/krakend_gin* -**/krakend_dns* -**/krakend_mux* -**/krakend_gorilla* -**/krakend_negroni* -**/krakend_httpcache* -**/krakend_jwt* +vendor server.rsa.crt server.rsa.key *.json diff --git a/.travis.yml b/.travis.yml index a054611e7..55dd9296b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,4 @@ go: - 1.8 script: - - make coveralls \ No newline at end of file + - make prepare coveralls \ No newline at end of file diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 000000000..00ffc8e03 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,79 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/gin-contrib/sse" + packages = ["."] + revision = "22d885f9ecc78bf4ee5d72b937e4bbcdc58e8cae" + +[[projects]] + name = "github.com/gin-gonic/gin" + packages = [ + ".", + "binding", + "render" + ] + revision = "d459835d2b077e44f7c9b453505ee29881d5d12d" + version = "v1.2" + +[[projects]] + name = "github.com/golang/protobuf" + packages = ["proto"] + revision = "925541529c1fa6821df4e44ce2723319eb2be768" + version = "v1.0.0" + +[[projects]] + name = "github.com/gorilla/context" + packages = ["."] + revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a" + version = "v1.1" + +[[projects]] + name = "github.com/gorilla/mux" + packages = ["."] + revision = "53c1911da2b537f792e7cafcb446b05ffe33b996" + version = "v1.6.1" + +[[projects]] + name = "github.com/mattn/go-isatty" + packages = ["."] + revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" + version = "v0.0.3" + +[[projects]] + name = "github.com/ugorji/go" + packages = ["codec"] + revision = "9831f2c3ac1068a78f50999a30db84270f647af6" + version = "v1.1" + +[[projects]] + name = "github.com/urfave/negroni" + packages = ["."] + revision = "5dbbc83f748fc3ad38585842b0aedab546d0ea1e" + version = "v0.3.0" + +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = ["unix"] + revision = "3b87a42e500a6dc65dae1a55d0b641295971163e" + +[[projects]] + name = "gopkg.in/go-playground/validator.v8" + packages = ["."] + revision = "5f1438d3fca68893a817e4a66806cea46a9e4ebf" + version = "v8.18.2" + +[[projects]] + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" + version = "v2.2.1" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "51493ead2db4b29cbec83f0b8df6e41047f09ef9c9927010766ffae337e58e4e" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 000000000..b28057ea7 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,42 @@ +# 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" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + name = "github.com/gin-gonic/gin" + version = "1.2.0" + +[[constraint]] + name = "github.com/gorilla/mux" + version = "1.6.1" + +[[constraint]] + name = "github.com/urfave/negroni" + version = "0.3.0" + +[prune] + go-tests = true + unused-packages = true diff --git a/Makefile b/Makefile index c5785f3ff..ff9696e5f 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,24 @@ .PHONY: all deps test build benchmark coveralls +DEP_VERSION=0.4.1 +OS := $(shell uname | tr '[:upper:]' '[:lower:]') + all: deps test build +prepare: + @echo "Installing dep..." + @curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-${OS}-amd64 -o ${GOPATH}/bin/dep + @chmod a+x ${GOPATH}/bin/dep + deps: - go get -u github.com/gin-gonic/gin - go get -u github.com/gorilla/mux - go get -u github.com/urfave/negroni + @echo "Setting up the vendors folder..." + @dep ensure -v + @go get github.com/devopsfaith/krakend-martian/register + @echo "" + @echo "Resolved dependencies:" + @dep status + @echo "" + @rm -rf vendor/github.com/devopsfaith/krakend-martian/register test: go fmt ./... From eddbe2f80300e7f5f316d6abb622bb9bd75d01c3 Mon Sep 17 00:00:00 2001 From: kpacha Date: Sat, 7 Apr 2018 13:19:11 +0200 Subject: [PATCH 2/2] makefile fixed --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index ff9696e5f..20ae9c1e5 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,10 @@ prepare: deps: @echo "Setting up the vendors folder..." @dep ensure -v - @go get github.com/devopsfaith/krakend-martian/register @echo "" @echo "Resolved dependencies:" @dep status @echo "" - @rm -rf vendor/github.com/devopsfaith/krakend-martian/register test: go fmt ./...