1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-22 13:34:03 +03:00

Add glide hash validation

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2017-02-05 16:42:04 +01:00
parent dacde21c27
commit 96197af3f1
No known key found for this signature in database
GPG Key ID: D808B4C167352E59
3 changed files with 17 additions and 2 deletions

View File

@ -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 .

View File

@ -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

14
script/validate-glide Executable file
View File

@ -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