Skip to content

Commit 3a8f89d

Browse files
authored
Merge pull request #418 from alexeldeib/ace/prow
🏃 task: enable running tests in prow
2 parents 2c5bca2 + 1ee8208 commit 3a8f89d

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

hack/check-everything.sh

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ SKIP_FETCH_TOOLS=${SKIP_FETCH_TOOLS:-""}
4848

4949
# fetch k8s API gen tools and make it available under kb_root_dir/bin.
5050
function fetch_kb_tools {
51-
if [ -n "$SKIP_FETCH_TOOLS" ]; then
52-
return 0
53-
fi
54-
5551
header_text "fetching tools"
5652
kb_tools_archive_name="kubebuilder-tools-$k8s_version-$goos-$goarch.tar.gz"
5753
kb_tools_download_url="https://storage.googleapis.com/kubebuilder-tools/$kb_tools_archive_name"
@@ -63,11 +59,34 @@ function fetch_kb_tools {
6359
tar -zvxf "$kb_tools_archive_path" -C "$tmp_root/"
6460
}
6561

62+
function is_installed {
63+
if [ command -v $1 &>/dev/null ]; then
64+
return 0
65+
fi
66+
return 1
67+
}
68+
69+
function fetch_go_tools {
70+
header_text "Checking for gometalinter.v2"
71+
if ! is_installed gometalinter.v2; then
72+
header_text "Installing gometalinter.v2"
73+
go get -u gopkg.in/alecthomas/gometalinter.v2 && gometalinter.v2 --install
74+
fi
75+
76+
header_text "Checking for dep"
77+
if ! is_installed dep; then
78+
header_text "Installing dep"
79+
go get -u github.com/golang/dep/cmd/dep
80+
fi
81+
}
82+
6683
header_text "using tools"
6784

68-
which gometalinter.v2
69-
which dep
70-
fetch_kb_tools
85+
if [ -z "$SKIP_FETCH_TOOLS" ]; then
86+
fetch_go_tools
87+
fetch_kb_tools
88+
fi
89+
7190
setup_envs
7291

7392
${hack_dir}/verify.sh

0 commit comments

Comments
 (0)