Mathieu Lecarme 7 years ago
parent
commit
ccdab4c524
5 changed files with 197 additions and 96 deletions
  1. 144 0
      Gopkg.lock
  2. 46 0
      Gopkg.toml
  3. 7 10
      Makefile
  4. 0 66
      glide.lock
  5. 0 20
      glide.yaml

+ 144 - 0
Gopkg.lock

@@ -0,0 +1,144 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+  digest = "1:0a2a75a7b0d611bf7ecb4e5a0054242815dc27e857b4b9f8ec62225993fd11b7"
+  name = "github.com/asaskevich/EventBus"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "68a521d7cbbb7a859c2608b06342f384b3bd5f5a"
+
+[[projects]]
+  digest = "1:adea5a94903eb4384abef30f3d878dc9ff6b6b5b0722da25b82e5169216dfb61"
+  name = "github.com/go-sql-driver/mysql"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "d523deb1b23d913de5bdada721a6071e71283618"
+  version = "v1.4.0"
+
+[[projects]]
+  digest = "1:38ec74012390146c45af1f92d46e5382b50531247929ff3a685d2b2be65155ac"
+  name = "github.com/gomodule/redigo"
+  packages = [
+    "internal",
+    "redis",
+  ]
+  pruneopts = "UT"
+  revision = "9c11da706d9b7902c6da69c592f75637793fe121"
+  version = "v2.0.0"
+
+[[projects]]
+  digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be"
+  name = "github.com/inconshreveable/mousetrap"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
+  version = "v1.0"
+
+[[projects]]
+  digest = "1:9e9193aa51197513b3abcb108970d831fbcf40ef96aa845c4f03276e1fa316d2"
+  name = "github.com/sirupsen/logrus"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc"
+  version = "v1.0.5"
+
+[[projects]]
+  digest = "1:2e47ed7754a1c00799e9ae484bd75220921cdd717a9244b3b6b83e39e74c3820"
+  name = "github.com/spf13/cobra"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "b62566898a99f2db9c68ed0026aa0a052e59678d"
+
+[[projects]]
+  digest = "1:618077e4176a1e95227b7fa94bc6443fdaa0c6f726501094590de4f5b6151222"
+  name = "github.com/spf13/pflag"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "25f8b5b07aece3207895bf19f7ab517eb3b22a40"
+
+[[projects]]
+  digest = "1:3f3a05ae0b95893d90b9b3b5afdb79a9b3d96e4e36e099d841ae602e4aca0da8"
+  name = "golang.org/x/crypto"
+  packages = ["ssh/terminal"]
+  pruneopts = "UT"
+  revision = "8ac0e0d97ce45cd83d1d7243c060cb8461dda5e9"
+
+[[projects]]
+  digest = "1:e2a579de26b74a8d2a7c4eba30ec65d895ef4cede50639d654734558cd2a917e"
+  name = "golang.org/x/net"
+  packages = [
+    "html",
+    "html/atom",
+    "html/charset",
+  ]
+  pruneopts = "UT"
+  revision = "1e491301e022f8f977054da4c2d852decd59571f"
+
+[[projects]]
+  digest = "1:ad7a8ea578273222bf5cfe0e98b76ac0fe3fc713d856edcae1f61118c01a20aa"
+  name = "golang.org/x/sys"
+  packages = [
+    "unix",
+    "windows",
+  ]
+  pruneopts = "UT"
+  revision = "7dca6fe1f43775aa6d1334576870ff63f978f539"
+
+[[projects]]
+  digest = "1:0a1c6b785efbffab91d456ba5efec59a122e39666149ab352b527b370ba67411"
+  name = "golang.org/x/text"
+  packages = [
+    "encoding",
+    "encoding/charmap",
+    "encoding/htmlindex",
+    "encoding/internal",
+    "encoding/internal/identifier",
+    "encoding/japanese",
+    "encoding/korean",
+    "encoding/simplifiedchinese",
+    "encoding/traditionalchinese",
+    "encoding/unicode",
+    "internal/gen",
+    "internal/language",
+    "internal/language/compact",
+    "internal/tag",
+    "internal/utf8internal",
+    "language",
+    "runes",
+    "transform",
+    "unicode/cldr",
+  ]
+  pruneopts = "UT"
+  revision = "5c1cf69b5978e5a34c5f9ba09a83e56acc4b7877"
+
+[[projects]]
+  digest = "1:c25289f43ac4a68d88b02245742347c94f1e108c534dda442188015ff80669b3"
+  name = "google.golang.org/appengine"
+  packages = ["cloudsql"]
+  pruneopts = "UT"
+  revision = "b1f26356af11148e710935ed1ac8a7f5702c7612"
+  version = "v1.1.0"
+
+[[projects]]
+  digest = "1:6a8414c6457caa5db639b9f5c084a95b698f2b3cc011151a4b43224a1d8fe0f5"
+  name = "gopkg.in/iconv.v1"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "16a760eb7e186ae0e3aedda00d4a1daa4d0701d8"
+  version = "v1.1.1"
+
+[solve-meta]
+  analyzer-name = "dep"
+  analyzer-version = 1
+  input-imports = [
+    "github.com/asaskevich/EventBus",
+    "github.com/go-sql-driver/mysql",
+    "github.com/gomodule/redigo/redis",
+    "github.com/sirupsen/logrus",
+    "github.com/spf13/cobra",
+    "golang.org/x/net/html/charset",
+    "gopkg.in/iconv.v1",
+  ]
+  solver-name = "gps-cdcl"
+  solver-version = 1

+ 46 - 0
Gopkg.toml

@@ -0,0 +1,46 @@
+# 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/go-sql-driver/mysql"
+  version = "1.3.0"
+
+[[constraint]]
+  name = "github.com/gomodule/redigo"
+  version = "~2.0.0"
+
+[[constraint]]
+  name = "github.com/sirupsen/logrus"
+  version = "~1.0.4"
+
+[[constraint]]
+  name = "gopkg.in/iconv.v1"
+  version = "~1.1.1"
+
+[prune]
+  go-tests = true
+  unused-packages = true

+ 7 - 10
Makefile

@@ -10,25 +10,22 @@ LD_FLAGS := -X $(ROOT).Version=$(VERSION) -X $(ROOT).Commit=$(COMMIT) -X $(ROOT)
 .PHONY: help clean dependencies test
 .PHONY: help clean dependencies test
 help:
 help:
 	@echo "Please use \`make <ROOT>' where <ROOT> is one of"
 	@echo "Please use \`make <ROOT>' where <ROOT> is one of"
-	@echo "  dependencies to go install the dependencies"
 	@echo "  guerrillad   to build the main binary for current platform"
 	@echo "  guerrillad   to build the main binary for current platform"
 	@echo "  test         to run unittests"
 	@echo "  test         to run unittests"
 
 
 clean:
 clean:
-	rm -f guerrillad
+	rm -f guerrillad vendor
 
 
-dependencies:
-	$(GO_VARS) $(GO) list -f='{{ join .Deps "\n" }}' $(ROOT)/cmd/guerrillad | grep -v $(ROOT) | tr '\n' ' ' | $(GO_VARS) xargs $(GO) get -u -v
-	$(GO_VARS) $(GO) list -f='{{ join .Deps "\n" }}' $(ROOT)/cmd/guerrillad | grep -v $(ROOT) | tr '\n' ' ' | $(GO_VARS) xargs $(GO) install -v
+vendor:
+	dep ensure
 
 
-guerrillad: *.go */*.go */*/*.go
+guerrillad: vendor
 	$(GO_VARS) $(GO) build -o="guerrillad" -ldflags="$(LD_FLAGS)" $(ROOT)/cmd/guerrillad
 	$(GO_VARS) $(GO) build -o="guerrillad" -ldflags="$(LD_FLAGS)" $(ROOT)/cmd/guerrillad
 
 
-guerrilladrace: *.go */*.go */*/*.go
+guerrilladrace: vendor
 	$(GO_VARS) $(GO) build -o="guerrillad" -race -ldflags="$(LD_FLAGS)" $(ROOT)/cmd/guerrillad
 	$(GO_VARS) $(GO) build -o="guerrillad" -race -ldflags="$(LD_FLAGS)" $(ROOT)/cmd/guerrillad
 
 
-
-test: *.go */*.go */*/*.go
+test: vendor
 	$(GO_VARS) $(GO) test -v .
 	$(GO_VARS) $(GO) test -v .
 	$(GO_VARS) $(GO) test -v ./tests
 	$(GO_VARS) $(GO) test -v ./tests
 	$(GO_VARS) $(GO) test -v ./cmd/guerrillad
 	$(GO_VARS) $(GO) test -v ./cmd/guerrillad
@@ -36,7 +33,7 @@ test: *.go */*.go */*/*.go
 	$(GO_VARS) $(GO) test -v ./backends
 	$(GO_VARS) $(GO) test -v ./backends
 	$(GO_VARS) $(GO) test -v ./mail
 	$(GO_VARS) $(GO) test -v ./mail
 
 
-testrace: *.go */*.go */*/*.go
+testrace: vendor
 	$(GO_VARS) $(GO) test -v . -race
 	$(GO_VARS) $(GO) test -v . -race
 	$(GO_VARS) $(GO) test -v ./tests -race
 	$(GO_VARS) $(GO) test -v ./tests -race
 	$(GO_VARS) $(GO) test -v ./cmd/guerrillad -race
 	$(GO_VARS) $(GO) test -v ./cmd/guerrillad -race

+ 0 - 66
glide.lock

@@ -1,66 +0,0 @@
-hash: f125882976090918727d8badc2f6dbbb8565a91081159ee65d39f667eabc81fe
-updated: 2018-06-11T02:31:42.387414528+10:00
-imports:
-- name: github.com/asaskevich/EventBus
-  version: 68a521d7cbbb7a859c2608b06342f384b3bd5f5a
-- name: github.com/go-sql-driver/mysql
-  version: d523deb1b23d913de5bdada721a6071e71283618
-- name: github.com/gomodule/redigo
-  version: 9c11da706d9b7902c6da69c592f75637793fe121
-  subpackages:
-  - internal
-  - redis
-- name: github.com/inconshreveable/mousetrap
-  version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
-- name: github.com/rakyll/statik
-  version: fd36b3595eb2ec8da4b8153b107f7ea08504899d
-  subpackages:
-  - fs
-- name: github.com/sirupsen/logrus
-  version: c155da19408a8799da419ed3eeb0cb5db0ad5dbc
-- name: github.com/spf13/cobra
-  version: b62566898a99f2db9c68ed0026aa0a052e59678d
-- name: github.com/spf13/pflag
-  version: 25f8b5b07aece3207895bf19f7ab517eb3b22a40
-- name: golang.org/x/crypto
-  version: 8ac0e0d97ce45cd83d1d7243c060cb8461dda5e9
-  subpackages:
-  - ssh/terminal
-- name: golang.org/x/net
-  version: 1e491301e022f8f977054da4c2d852decd59571f
-  subpackages:
-  - html
-  - html/atom
-  - html/charset
-- name: golang.org/x/sys
-  version: 7dca6fe1f43775aa6d1334576870ff63f978f539
-  subpackages:
-  - unix
-  - windows
-- name: golang.org/x/text
-  version: 5c1cf69b5978e5a34c5f9ba09a83e56acc4b7877
-  subpackages:
-  - encoding
-  - encoding/charmap
-  - encoding/htmlindex
-  - encoding/internal
-  - encoding/internal/identifier
-  - encoding/japanese
-  - encoding/korean
-  - encoding/simplifiedchinese
-  - encoding/traditionalchinese
-  - encoding/unicode
-  - internal/language
-  - internal/language/compact
-  - internal/tag
-  - internal/utf8internal
-  - language
-  - runes
-  - transform
-- name: google.golang.org/appengine
-  version: b1f26356af11148e710935ed1ac8a7f5702c7612
-  subpackages:
-  - cloudsql
-- name: gopkg.in/iconv.v1
-  version: 16a760eb7e186ae0e3aedda00d4a1daa4d0701d8
-testImports: []

+ 0 - 20
glide.yaml

@@ -1,20 +0,0 @@
-package: github.com/flashmob/go-guerrilla
-import:
-- package: github.com/sirupsen/logrus
-  version: ~1.0.4
-- package: github.com/gomodule/redigo
-  version: ~2.0.0
-  subpackages:
-  - redis
-- package: github.com/spf13/cobra
-- package: gopkg.in/iconv.v1
-  version: ~1.1.1
-- package: github.com/asaskevich/EventBus
-  version: 68a521d7cbbb7a859c2608b06342f384b3bd5f5a
-- package: github.com/go-sql-driver/mysql
-  version: ^1.3.0
-- package: golang.org/x/sys
-  version: 7dca6fe1f43775aa6d1334576870ff63f978f539
-- package: golang.org/x/net
-  subpackages:
-  - html/charset