Add glide hash validation
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
dacde21c27
commit
96197af3f1
3 changed files with 17 additions and 2 deletions
2
Makefile
2
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 .
|
||||
|
|
|
@ -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
14
script/validate-glide
Executable 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
|
Loading…
Reference in a new issue