diff --git a/Makefile b/Makefile index 6f687df46..561a6ab0c 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ test-integration: build ## run the integration tests $(DOCKER_RUN_TRAEFIK) ./script/make.sh generate test-integration validate: build ## validate gofmt, golint and go vet - $(DOCKER_RUN_TRAEFIK) ./script/make.sh validate-gofmt validate-govet validate-golint validate-misspell + $(DOCKER_RUN_TRAEFIK) ./script/make.sh validate-glide validate-gofmt validate-govet validate-golint validate-misspell build: dist docker build $(DOCKER_BUILD_ARGS) -t "$(TRAEFIK_DEV_IMAGE)" -f build.Dockerfile . diff --git a/build.Dockerfile b/build.Dockerfile index aaa8dac52..25d9f4776 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -3,7 +3,8 @@ FROM golang:1.7 RUN go get github.com/jteeuwen/go-bindata/... \ && go get github.com/golang/lint/golint \ && go get github.com/kisielk/errcheck \ -&& go get github.com/client9/misspell/cmd/misspell +&& go get github.com/client9/misspell/cmd/misspell \ +&& go get github.com/mattfarina/glide-hash # Which docker version to test on ARG DOCKER_VERSION=1.10.3 diff --git a/script/validate-glide b/script/validate-glide new file mode 100755 index 000000000..d5a756c85 --- /dev/null +++ b/script/validate-glide @@ -0,0 +1,14 @@ +#!/bin/bash + +source "$(dirname "$BASH_SOURCE")/.validate" + +grep `glide-hash` glide.lock +if [ $? -eq 0 ]; then + echo 'Congratulations! glide.lock is unchanged.' +else + { + echo "Error: glide.lock has been manually changed. Don't do this. Use glide up instead." + echo + } >&2 + false +fi