Merge pull request #380 from jzelinskie/rmglide
*: remove glide from README & Dockerfile
This commit is contained in:
commit
6bef53658b
3 changed files with 18 additions and 18 deletions
18
.travis.yml
18
.travis.yml
|
@ -11,20 +11,20 @@ matrix:
|
||||||
- go get -u golang.org/x/tools/cmd/...
|
- go get -u golang.org/x/tools/cmd/...
|
||||||
script:
|
script:
|
||||||
- dep ensure
|
- dep ensure
|
||||||
- go test -v $(go list ./... | grep -v /vendor/)
|
- go test -v $(go list ./...)
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./...)
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||||
# Using HEAD of dependencies
|
# Using HEAD of dependencies
|
||||||
- install:
|
- install:
|
||||||
- go get -t ./...
|
- go get -t ./...
|
||||||
- go get -u github.com/golang/lint/...
|
- go get -u github.com/golang/lint/...
|
||||||
- go get -u golang.org/x/tools/cmd/...
|
- go get -u golang.org/x/tools/cmd/...
|
||||||
script:
|
script:
|
||||||
- go test -v $(go list ./... | grep -v /vendor/)
|
- go test -v $(go list ./...)
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./...)
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||||
allow_failures:
|
allow_failures:
|
||||||
# Using HEAD of dependencies
|
# Using HEAD of dependencies
|
||||||
- install:
|
- install:
|
||||||
|
@ -32,10 +32,10 @@ matrix:
|
||||||
- go get -u github.com/golang/lint/...
|
- go get -u github.com/golang/lint/...
|
||||||
- go get -u golang.org/x/tools/cmd/...
|
- go get -u golang.org/x/tools/cmd/...
|
||||||
script:
|
script:
|
||||||
- go test -v $(go list ./... | grep -v /vendor/)
|
- go test -v $(go list ./...)
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./...)
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
channels:
|
channels:
|
||||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -1,18 +1,18 @@
|
||||||
FROM golang:alpine AS build-env
|
FROM golang:alpine AS build-env
|
||||||
LABEL maintainer "Jimmy Zelinskie <jimmyzelinskie@gmail.com>"
|
LABEL maintainer "Jimmy Zelinskie <jimmyzelinskie+git@gmail.com>"
|
||||||
|
|
||||||
# Install OS-level dependencies.
|
# Install OS-level dependencies.
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add curl git && \
|
apk add curl git
|
||||||
curl https://glide.sh/get | sh
|
|
||||||
|
|
||||||
# Copy our source code into the container.
|
# Copy our source code into the container.
|
||||||
WORKDIR /go/src/github.com/chihaya/chihaya
|
WORKDIR /go/src/github.com/chihaya/chihaya
|
||||||
COPY . /go/src/github.com/chihaya/chihaya
|
COPY . /go/src/github.com/chihaya/chihaya
|
||||||
|
|
||||||
# Install our golang dependencies and compile our binary.
|
# Install our golang dependencies and compile our binary.
|
||||||
RUN glide install
|
RUN go get -u github.com/golang/dep/...
|
||||||
RUN CGO_ENABLED=0 go install github.com/chihaya/chihaya/cmd/chihaya
|
RUN dep ensure
|
||||||
|
RUN CGO_ENABLED=0 go install github.com/chihaya/chihaya/cmd/...
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
COPY --from=build-env /go/bin/chihaya /chihaya
|
COPY --from=build-env /go/bin/chihaya /chihaya
|
||||||
|
|
|
@ -77,18 +77,18 @@ $ $GOPATH/bin/chihaya --help
|
||||||
|
|
||||||
#### Reproducible Builds
|
#### Reproducible Builds
|
||||||
|
|
||||||
Reproducible builds are handled by using [glide] to vendor dependencies.
|
Reproducible builds are handled by using [dep] to vendor dependencies.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ mkdir chihaya && export GOPATH=$PWD/chihaya
|
$ mkdir chihaya && export GOPATH=$PWD/chihaya
|
||||||
$ git clone git@github.com:chihaya/chihaya.git $GOPATH/src/github.com/chihaya/chihaya
|
$ git clone git@github.com:chihaya/chihaya.git $GOPATH/src/github.com/chihaya/chihaya
|
||||||
$ cd $GOPATH/src/github.com/chihaya/chihaya
|
$ cd $GOPATH/src/github.com/chihaya/chihaya
|
||||||
$ glide install
|
$ dep ensure
|
||||||
$ go install github.com/chihaya/chihaya/cmd/...
|
$ go install github.com/chihaya/chihaya/cmd/...
|
||||||
$ $GOPATH/bin/chihaya --help
|
$ $GOPATH/bin/chihaya --help
|
||||||
```
|
```
|
||||||
|
|
||||||
[glide]: https://glide.sh
|
[dep]: https://github.com/golang/dep
|
||||||
|
|
||||||
#### Docker
|
#### Docker
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ The following will run all tests and benchmarks.
|
||||||
Removing `-bench` will just run unit tests.
|
Removing `-bench` will just run unit tests.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ go test -bench $(glide novendor | grep -v contrib)
|
$ go test -bench $(go list ./...)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
Loading…
Reference in a new issue