Browse Source

Merge branch 'athoune-dep'

flashmob 6 years ago
parent
commit
929a95181f
6 changed files with 194 additions and 106 deletions
  1. 6 6
      .travis.yml
  2. 149 0
      Gopkg.lock
  3. 32 0
      Gopkg.toml
  4. 7 10
      Makefile
  5. 0 70
      glide.lock
  6. 0 20
      glide.yaml

+ 6 - 6
.travis.yml

@@ -1,19 +1,19 @@
 language: go
 language: go
 sudo: false
 sudo: false
 go:
 go:
-  - 1.7
-  - 1.8
   - 1.9
   - 1.9
   - 1.10.x
   - 1.10.x
+  - 1.11.x
   - master
   - master
 
 
 install:
 install:
   - export GO15VENDOREXPERIMENT=1
   - export GO15VENDOREXPERIMENT=1
-  - go get github.com/Masterminds/glide
-  - go install github.com/Masterminds/glide
-  - glide up
+  - go get -u github.com/golang/dep/cmd/dep
+    # Add Godeps dependencies to GOPATH and PATH
+  - export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace:$GOPATH"
+  - export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
 
 
 script:
 script:
   - ./.travis.gofmt.sh
   - ./.travis.gofmt.sh
   - make guerrillad
   - make guerrillad
-  - make test
+  - make test

+ 149 - 0
Gopkg.lock

@@ -0,0 +1,149 @@
+# 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:ec6f9bf5e274c833c911923c9193867f3f18788c461f76f05f62bb1510e0ae65"
+  name = "github.com/go-sql-driver/mysql"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "72cd26f257d44c1114970e19afddcd812016007e"
+  version = "v1.4.1"
+
+[[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:d867dfa6751c8d7a435821ad3b736310c2ed68945d05b50fb9d23aee0540c8cc"
+  name = "github.com/sirupsen/logrus"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "3e01752db0189b9157070a0e1668a620f9a85da2"
+  version = "v1.0.6"
+
+[[projects]]
+  digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939"
+  name = "github.com/spf13/cobra"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
+  version = "v0.0.3"
+
+[[projects]]
+  digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2"
+  name = "github.com/spf13/pflag"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "298182f68c66c05229eb03ac171abe6e309ee79a"
+  version = "v1.0.3"
+
+[[projects]]
+  branch = "master"
+  digest = "1:bbe51412d9915d64ffaa96b51d409e070665efc5194fcf145c4a27d4133107a4"
+  name = "golang.org/x/crypto"
+  packages = ["ssh/terminal"]
+  pruneopts = "UT"
+  revision = "a29dc8fdc73485234dbef99ebedb95d2eced08de"
+
+[[projects]]
+  branch = "master"
+  digest = "1:a167b5c532f3245f5a147ade26185f16d6ee8f8d3f6c9846f447e9d8b9705505"
+  name = "golang.org/x/net"
+  packages = [
+    "html",
+    "html/atom",
+    "html/charset"
+  ]
+  pruneopts = "UT"
+  revision = "f4e77d36d62c17c2336347bb2670ddbd02d092b7"
+
+[[projects]]
+  digest = "1:ad7a8ea578273222bf5cfe0e98b76ac0fe3fc713d856edcae1f61118c01a20aa"
+  name = "golang.org/x/sys"
+  packages = [
+    "unix",
+    "windows"
+  ]
+  pruneopts = "UT"
+  revision = "7dca6fe1f43775aa6d1334576870ff63f978f539"
+
+[[projects]]
+  digest = "1:8a0baffd5559acaa560f854d7d525c02f4fec2d4f8a214398556fb661a10f6e0"
+  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 = "342b2e1fbaa52c93f31447ad2c6abc048c63e475"
+  version = "v0.3.2"
+
+[[projects]]
+  digest = "1:c25289f43ac4a68d88b02245742347c94f1e108c534dda442188015ff80669b3"
+  name = "google.golang.org/appengine"
+  packages = ["cloudsql"]
+  pruneopts = "UT"
+  revision = "54a98f90d1c46b7731eb8fb305d2a321c30ef610"
+  version = "v1.5.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

+ 32 - 0
Gopkg.toml

@@ -0,0 +1,32 @@
+[[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]]
+  branch = "master"
+  name = "golang.org/x/net"
+
+[[constraint]]
+  name = "gopkg.in/iconv.v1"
+  version = "~1.1.1"
+
+[[constraint]]
+  name = "github.com/asaskevich/EventBus"
+  revision = "68a521d7cbbb7a859c2608b06342f384b3bd5f5a"
+
+# The following locks logrus to a particular version of x/sys
+[[override]]
+    name = "golang.org/x/sys"
+    revision = "7dca6fe1f43775aa6d1334576870ff63f978f539"
+
+[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 - 70
glide.lock

@@ -1,70 +0,0 @@
-hash: 9d467015838b5163cc5f1ebb92fa68fd4721445b2dbf236a03d002c92b4ba52a
-updated: 2018-12-24T15:20:01.207901397Z
-imports:
-- name: github.com/asaskevich/EventBus
-  version: 68a521d7cbbb7a859c2608b06342f384b3bd5f5a
-- name: github.com/garyburd/redigo
-  version: 8873b2f1995f59d4bcdd2b0dc9858e2cb9bf0c13
-  subpackages:
-  - internal
-  - redis
-- name: github.com/go-sql-driver/mysql
-  version: 72cd26f257d44c1114970e19afddcd812016007e
-- name: github.com/gomodule/redigo
-  version: 8873b2f1995f59d4bcdd2b0dc9858e2cb9bf0c13
-  subpackages:
-  - redis
-- name: github.com/inconshreveable/mousetrap
-  version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
-- name: github.com/rakyll/statik
-  version: 79258177a57a85a8ab2eca7ce0936aad80307f4e
-  subpackages:
-  - fs
-- name: github.com/sirupsen/logrus
-  version: 3e01752db0189b9157070a0e1668a620f9a85da2
-- name: github.com/spf13/cobra
-  version: d2d81d9a96e23f0255397222bb0b4e3165e492dc
-- name: github.com/spf13/pflag
-  version: 24fa6976df40757dce6aea913e7b81ade90530e1
-- name: golang.org/x/crypto
-  version: 505ab145d0a99da450461ae2c1a9f6cd10d1f447
-  subpackages:
-  - ssh/terminal
-- name: golang.org/x/net
-  version: 927f97764cc334a6575f4b7a1584a147864d5723
-  subpackages:
-  - html
-  - html/atom
-  - html/charset
-- name: golang.org/x/sys
-  version: 7dca6fe1f43775aa6d1334576870ff63f978f539
-  subpackages:
-  - unix
-  - windows
-- name: golang.org/x/text
-  version: 17bcc049122f272a32787ba38073ee47433023e9
-  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: e9657d882bb81064595ca3b56cbe2546bbabf7b1
-  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