2018-07-01 04:35:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
2018-08-07 11:31:27 +00:00
|
|
|
dolint='gometalinter --exclude="rice-box.go" --exclude="vendor" --deadline=300s ./...'
|
2018-07-01 04:35:53 +00:00
|
|
|
|
2018-12-25 23:48:43 +00:00
|
|
|
WDIR="/go/src/github.com/filebrowser/filebrowser"
|
|
|
|
|
2018-07-01 04:35:53 +00:00
|
|
|
if [ "$USE_DOCKER" != "" ]; then
|
2018-12-25 23:48:43 +00:00
|
|
|
$(command -v winpty) docker run --rm -itv "/$(pwd):/$WDIR" -w "/$WDIR" filebrowser/dev sh -c "\
|
|
|
|
GO111MODULE=on go get -v ./... && \
|
|
|
|
GO111MODULE=on go mod vendor && \
|
|
|
|
GO111MODULE=off $dolint"
|
2018-07-01 04:35:53 +00:00
|
|
|
else
|
|
|
|
$dolint
|
2018-08-07 11:04:43 +00:00
|
|
|
fi
|