Switch from glide to dep for dependency management. Fixes #732.

This implements the new `dep` command into our build process and removes
all references to Glide.
This commit is contained in:
Cody Soyland 2017-07-21 11:07:00 -05:00
parent 2e5405573b
commit 5bc9c43611
9 changed files with 269 additions and 187 deletions

View file

@ -4,11 +4,6 @@ go:
- 1.8
- master
addons:
apt:
sources:
- sourceline: 'ppa:masterminds/glide'
packages:
- glide
before_install:
- go get github.com/mattn/goveralls
script:

View file

@ -1,16 +1,10 @@
FROM golang:1.8.1 as builder
FROM golang:1.8.3 as builder
ARG ldflags=''
ARG GLIDE="https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-linux-amd64.tar.gz"
ARG GLIDE_HASH="d6d3816c70fba716466e7381a9c06cb31565a3b87acb5bad9dd3beb0a9f9b0f8"
COPY . /go/src/github.com/pilosa/pilosa
RUN wget ${GLIDE} -O /go/glide.tar.gz -q \
&& tar xf /go/glide.tar.gz \
&& mv /go/linux-amd64/glide /go/bin \
&& echo "${GLIDE_HASH} /go/bin/glide" | shasum -a 256 -c - \
&& cd /go/src/github.com/pilosa/pilosa \
RUN cd /go/src/github.com/pilosa/pilosa \
&& make vendor \
&& CGO_ENABLED=0 go install -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa

199
Gopkg.lock generated Normal file
View file

@ -0,0 +1,199 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/BurntSushi/toml"
packages = ["."]
revision = "99064174e013895bbd9b025c31100bd1d9b590ca"
[[projects]]
branch = "master"
name = "github.com/CAFxX/gcnotifier"
packages = ["."]
revision = "adea3e70515666981da25214a7d3e377e4841c22"
[[projects]]
name = "github.com/DataDog/datadog-go"
packages = ["statsd"]
revision = "909c02b65dd8a52e8fa6072db9752a112227cf21"
version = "1.0.0"
[[projects]]
name = "github.com/armon/go-metrics"
packages = ["."]
revision = "97c69685293dce4c0a2d0b19535179bbc976e4d2"
[[projects]]
name = "github.com/boltdb/bolt"
packages = ["."]
revision = "4b1ebc1869ad66568b313d0dc410e2be72670dda"
[[projects]]
name = "github.com/davecgh/go-spew"
packages = ["spew"]
revision = "346938d642f2ec3594ed81d874461961cd0faa76"
version = "v1.1.0"
[[projects]]
name = "github.com/fsnotify/fsnotify"
packages = ["."]
revision = "7d7316ed6e1ed2de075aab8dfc76de5d158d66e1"
[[projects]]
name = "github.com/gogo/protobuf"
packages = ["proto"]
revision = "a9cd0c35b97daf74d0ebf3514c5254814b2703b4"
[[projects]]
name = "github.com/golang/groupcache"
packages = ["lru"]
revision = "a6b377e3400b08991b80d6805d627f347f983866"
[[projects]]
branch = "master"
name = "github.com/golang/protobuf"
packages = ["proto"]
revision = "8ee79997227bf9b34611aee7946ae64735e6fd93"
[[projects]]
branch = "master"
name = "github.com/gorilla/context"
packages = ["."]
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
[[projects]]
name = "github.com/gorilla/mux"
packages = ["."]
revision = "392c28fe23e1c45ddba891b0320b3b5df220beea"
version = "v1.3.0"
[[projects]]
branch = "master"
name = "github.com/hashicorp/errwrap"
packages = ["."]
revision = "7554cd9344cec97297fa6649b055a8c98c2a1e55"
[[projects]]
branch = "master"
name = "github.com/hashicorp/go-msgpack"
packages = ["codec"]
revision = "fa3f63826f7c23912c15263591e65d54d080b458"
[[projects]]
name = "github.com/hashicorp/go-multierror"
packages = ["."]
revision = "ed905158d87462226a13fe39ddf685ea65f1c11f"
[[projects]]
name = "github.com/hashicorp/hcl"
packages = [".","hcl/ast","hcl/parser","hcl/scanner","hcl/strconv","hcl/token","json/parser","json/scanner","json/token"]
revision = "630949a3c5fa3c613328e1b8256052cbc2327c9b"
[[projects]]
name = "github.com/hashicorp/memberlist"
packages = ["."]
revision = "9800c50ab79c002353852a9b1095e9591b161513"
version = "v0.1.0"
[[projects]]
branch = "master"
name = "github.com/inconshreveable/mousetrap"
packages = ["."]
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
[[projects]]
name = "github.com/magiconair/properties"
packages = ["."]
revision = "b3b15ef068fd0b17ddf408a23669f20811d194d2"
[[projects]]
name = "github.com/miekg/dns"
packages = ["."]
revision = "ca336a1f95a6b89be9c250df26c7a41742eb4a6f"
[[projects]]
name = "github.com/mitchellh/mapstructure"
packages = ["."]
revision = "db1efb556f84b25a0a13a04aad883943538ad2e0"
[[projects]]
name = "github.com/pelletier/go-buffruneio"
packages = ["."]
revision = "c37440a7cf42ac63b919c752ca73a85067e05992"
version = "v0.2.0"
[[projects]]
name = "github.com/pelletier/go-toml"
packages = ["."]
revision = "23f644976aa7c724adf4aec911dadf4af17840ab"
[[projects]]
name = "github.com/rakyll/statik"
packages = ["fs"]
revision = "89fe3459b5c829c32e89bdff9c43f18aad728f2f"
[[projects]]
branch = "master"
name = "github.com/spf13/afero"
packages = [".","mem"]
revision = "9be650865eab0c12963d8753212f4f9c66cdcf12"
[[projects]]
name = "github.com/spf13/cast"
packages = ["."]
revision = "4f1683a2242a92e62d6ff705a30e435cbf2b50a3"
[[projects]]
branch = "master"
name = "github.com/spf13/cobra"
packages = ["."]
revision = "fcd0c5a1df88f5d6784cb4feead962c3f3d0b66c"
[[projects]]
name = "github.com/spf13/jwalterweatherman"
packages = ["."]
revision = "fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66"
[[projects]]
name = "github.com/spf13/pflag"
packages = ["."]
revision = "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
[[projects]]
branch = "master"
name = "github.com/spf13/viper"
packages = ["."]
revision = "7538d73b4eb9511d85a9f1dfef202eeb8ac260f4"
[[projects]]
name = "golang.org/x/net"
packages = ["context"]
revision = "60c41d1de8da134c05b7b40154a9a82bf5b7edb9"
[[projects]]
branch = "master"
name = "golang.org/x/sync"
packages = ["errgroup"]
revision = "450f422ab23cf9881c94e2db30cac0eb1b7cf80c"
[[projects]]
name = "golang.org/x/sys"
packages = ["unix"]
revision = "c200b10b5d5e122be351b67af224adc6128af5bf"
[[projects]]
name = "golang.org/x/text"
packages = ["internal/gen","internal/triegen","internal/ucd","transform","unicode/cldr","unicode/norm"]
revision = "5a42fa2464759cbb7ee0af9de00b54d69f09a29c"
[[projects]]
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "a3f3340b5840cee44f372bddb5880fcbc419b46a"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "84ff0992f3a6023a9d4832d6aea43d6aec19878a4b9e991ba8ff8269b589e816"
solver-name = "gps-cdcl"
solver-version = 1

49
Gopkg.toml Normal file
View file

@ -0,0 +1,49 @@
# 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]]
name = "github.com/BurntSushi/toml"
revision = "99064174e013895bbd9b025c31100bd1d9b590ca"
[[constraint]]
branch = "master"
name = "github.com/CAFxX/gcnotifier"
[[constraint]]
name = "github.com/boltdb/bolt"
revision = "4b1ebc1869ad66568b313d0dc410e2be72670dda"
[[constraint]]
name = "github.com/gorilla/mux"
version = "1.3.0"
[[constraint]]
name = "github.com/hashicorp/memberlist"
version = "=0.1.0"
[[constraint]]
branch = "master"
name = "github.com/spf13/cobra"
[[constraint]]
branch = "master"
name = "github.com/spf13/viper"

View file

@ -1,6 +1,6 @@
.PHONY: glide vendor-update docker pilosa crossbuild install generate statik release test cover cover-pkg cover-viz
.PHONY: dep docker pilosa crossbuild install generate statik release test cover cover-pkg cover-viz
GLIDE := $(shell command -v glide 2>/dev/null)
DEP := $(shell command -v dep 2>/dev/null)
STATIK := $(shell command -v statik 2>/dev/null)
PROTOC := $(shell command -v protoc 2>/dev/null)
VERSION := $(shell git describe --tags 2> /dev/null || echo unknown)
@ -15,24 +15,17 @@ default: test pilosa
$(GOPATH)/bin:
mkdir $(GOPATH)/bin
glide: $(GOPATH)/bin
ifndef GLIDE
curl https://glide.sh/get | sh
dep: $(GOPATH)/bin
go get -u github.com/golang/dep/cmd/dep
vendor: Gopkg.toml
ifndef DEP
make dep
endif
dep ensure
$(GLIDE):
make glide
vendor: $(GLIDE) glide.yaml
ifndef GLIDE
curl https://glide.sh/get | sh
endif
glide install
glide.lock: glide glide.yaml
glide update
vendor-update: glide.lock
Gopkg.lock: dep Gopkg.toml
dep ensure
test: vendor
go test $(PKGS) $(TESTFLAGS)

View file

@ -21,12 +21,18 @@ git clone git@github.com:${USER}/pilosa.git
cd ${GOPATH}/src/github.com/pilosa/pilosa
```
Install [Glide][] to manage dependencies.
Install `dep` to manage dependencies:
```sh
go get -u github.com/golang/dep/cmd/dep
```
Install Pilosa command line tools:
```sh
go install github.com/pilosa/pilosa/cmd/...
make install
# or:
# dep ensure && go install github.com/pilosa/pilosa/cmd/...
```
Running `pilosa` should now run a Pilosa instance.
@ -61,5 +67,3 @@ git push --set-upstream origin a-branch-for-the-task
```
All left to do is creating a pull request on github.com.
[Glide]: http://glide.sh/

View file

@ -133,7 +133,6 @@ There are four ways to install Pilosa on MacOS: Use [Homebrew](https://brew.sh/)
* [Go](https://golang.org/doc/install). Be sure to set the `$GOPATH` and `$PATH` environment variables as described here (https://golang.org/doc/code.html#GOPATH).
* [Git](https://git-scm.com/)
* [Glide](http://glide.sh/)
2. Clone the repo:
```
@ -286,7 +285,6 @@ There are three ways to install Pilosa on Linux: download the binary (recommende
* [Go](https://golang.org/doc/install). Be sure to set the `$GOPATH` and `$PATH` environment variables as described here (https://golang.org/doc/code.html#GOPATH).
* [Git](https://git-scm.com/)
* [Glide](http://glide.sh/)
2. Clone the repo:
```

110
glide.lock generated
View file

@ -1,110 +0,0 @@
hash: 98b6811c335d30f9711d53472ad3e1ae51090a04751dd6dc3bcb97a54e01afb9
updated: 2017-05-01T10:42:29.124689561-05:00
imports:
- name: github.com/armon/go-metrics
version: 97c69685293dce4c0a2d0b19535179bbc976e4d2
- name: github.com/boltdb/bolt
version: 4b1ebc1869ad66568b313d0dc410e2be72670dda
- name: github.com/BurntSushi/toml
version: 99064174e013895bbd9b025c31100bd1d9b590ca
- name: github.com/CAFxX/gcnotifier
version: adea3e70515666981da25214a7d3e377e4841c22
- name: github.com/DataDog/datadog-go
version: 909c02b65dd8a52e8fa6072db9752a112227cf21
subpackages:
- statsd
- name: github.com/davecgh/go-spew
version: 346938d642f2ec3594ed81d874461961cd0faa76
subpackages:
- spew
- name: github.com/fsnotify/fsnotify
version: 7d7316ed6e1ed2de075aab8dfc76de5d158d66e1
- name: github.com/gogo/protobuf
version: a9cd0c35b97daf74d0ebf3514c5254814b2703b4
subpackages:
- proto
- name: github.com/golang/groupcache
version: a6b377e3400b08991b80d6805d627f347f983866
subpackages:
- lru
- name: github.com/golang/protobuf
version: 8ee79997227bf9b34611aee7946ae64735e6fd93
subpackages:
- proto
- name: github.com/gorilla/context
version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42
- name: github.com/gorilla/mux
version: 392c28fe23e1c45ddba891b0320b3b5df220beea
- name: github.com/hashicorp/errwrap
version: 7554cd9344cec97297fa6649b055a8c98c2a1e55
- name: github.com/hashicorp/go-msgpack
version: fa3f63826f7c23912c15263591e65d54d080b458
subpackages:
- codec
- name: github.com/hashicorp/go-multierror
version: ed905158d87462226a13fe39ddf685ea65f1c11f
- name: github.com/hashicorp/hcl
version: 630949a3c5fa3c613328e1b8256052cbc2327c9b
subpackages:
- hcl/ast
- hcl/parser
- hcl/scanner
- hcl/strconv
- hcl/token
- json/parser
- json/scanner
- json/token
- name: github.com/hashicorp/memberlist
version: 9800c50ab79c002353852a9b1095e9591b161513
- name: github.com/inconshreveable/mousetrap
version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
- name: github.com/magiconair/properties
version: b3b15ef068fd0b17ddf408a23669f20811d194d2
- name: github.com/miekg/dns
version: ca336a1f95a6b89be9c250df26c7a41742eb4a6f
- name: github.com/mitchellh/mapstructure
version: db1efb556f84b25a0a13a04aad883943538ad2e0
- name: github.com/pelletier/go-buffruneio
version: c37440a7cf42ac63b919c752ca73a85067e05992
- name: github.com/pelletier/go-toml
version: 23f644976aa7c724adf4aec911dadf4af17840ab
- name: github.com/rakyll/statik
version: 89fe3459b5c829c32e89bdff9c43f18aad728f2f
subpackages:
- fs
- name: github.com/satori/go.uuid
version: 879c5887cd475cd7864858769793b2ceb0d44feb
- name: github.com/spf13/afero
version: 9be650865eab0c12963d8753212f4f9c66cdcf12
subpackages:
- mem
- name: github.com/spf13/cast
version: 4f1683a2242a92e62d6ff705a30e435cbf2b50a3
- name: github.com/spf13/cobra
version: fcd0c5a1df88f5d6784cb4feead962c3f3d0b66c
- name: github.com/spf13/jwalterweatherman
version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66
- name: github.com/spf13/pflag
version: 9ff6c6923cfffbcd502984b8e0c80539a94968b7
- name: github.com/spf13/viper
version: 7538d73b4eb9511d85a9f1dfef202eeb8ac260f4
- name: golang.org/x/net
version: 60c41d1de8da134c05b7b40154a9a82bf5b7edb9
subpackages:
- context
- name: golang.org/x/sync
version: 450f422ab23cf9881c94e2db30cac0eb1b7cf80c
subpackages:
- errgroup
- name: golang.org/x/sys
version: c200b10b5d5e122be351b67af224adc6128af5bf
subpackages:
- unix
- name: golang.org/x/text
version: 5a42fa2464759cbb7ee0af9de00b54d69f09a29c
subpackages:
- transform
- unicode/norm
- name: gopkg.in/yaml.v2
version: a3f3340b5840cee44f372bddb5880fcbc419b46a
testImports: []

View file

@ -1,40 +0,0 @@
package: github.com/pilosa/pilosa
import:
- package: github.com/BurntSushi/toml
version: 99064174e013895bbd9b025c31100bd1d9b590ca
- package: github.com/DataDog/datadog-go
version: ~1.0.0
subpackages:
- statsd
- package: github.com/boltdb/bolt
version: 4b1ebc1869ad66568b313d0dc410e2be72670dda
- package: github.com/davecgh/go-spew
version: ~1.1.0
subpackages:
- spew
- package: github.com/gogo/protobuf
version: a9cd0c35b97daf74d0ebf3514c5254814b2703b4
subpackages:
- proto
- package: github.com/golang/groupcache
version: a6b377e3400b08991b80d6805d627f347f983866
subpackages:
- lru
- package: golang.org/x/sys
version: c200b10b5d5e122be351b67af224adc6128af5bf
subpackages:
- unix
- package: github.com/golang/protobuf
- package: github.com/satori/go.uuid
version: ^1.1.0
- package: github.com/spf13/cobra
- package: github.com/spf13/viper
- package: github.com/gorilla/mux
version: ^1.3.0
- package: github.com/rakyll/statik
version: 89fe3459b5c829c32e89bdff9c43f18aad728f2f
subpackages:
- fs
- package: github.com/hashicorp/memberlist
- package: golang.org/x/sync
- package: github.com/CAFxX/gcnotifier