1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-06 09:47:02 +01:00

Added go-vet shell script

This commit is contained in:
rabugopsl
2018-08-06 09:16:43 -05:00
parent 434f1cba41
commit eb71c8deac

18
hack/go-vet.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
if [ "$IS_CONTAINER" != "" ]; then
cd ..
SOURCE_DIR="$(pwd)"
cd .. || exit
ROOT_DIR="$(pwd)"
TARGET_DIR="${ROOT_DIR}/openshift"
if [ "$SOURCE_DIR" != "$TARGET_DIR" ]; then
mv "$SOURCE_DIR" "$TARGET_DIR"
fi;
cd "${TARGET_DIR}/installer/" || exit
go vet "$1"
else
for dir in "$@"
do
docker run --rm --env IS_CONTAINER='TRUE' -v "$PWD":/go/src/github.com/openshift/installer -w /go/src/github.com/openshift/installer quay.io/coreos/golang-testing ./hack/go-vet.sh "$dir"
done;
fi;