Adjust scripts to be go v1.14 compatible

This commit is contained in:
jregan
2020-04-22 18:34:15 -07:00
parent 59b1662b92
commit 53e7c87604
4 changed files with 35 additions and 26 deletions

15
hack/shellHelpers.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
# TODO: Make the code ignorant of the CI environment "brand name".
# We used to run CI tests on travis, and disabled certain tests
# when running there. Now we run on Prow, so look for that.
# https://github.com/kubernetes/test-infra/blob/master/prow/jobs.md
# Might be useful to eschew using the brand name of the CI environment
# (replace "travis" with "RemoteCI" or something - not just switch to "prow").
function onLinuxAndNotOnRemoteCI {
[[ ("linux" == "$(go env GOOS)") && (-z ${PROW_JOB_ID+x}) ]] && return
false
}