Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ required = [
"k8s.io/code-generator/cmd/client-gen",
"k8s.io/code-generator/cmd/lister-gen",
"k8s.io/code-generator/cmd/informer-gen",
"github.com/google/go-containerregistry/cmd/ko",
"github.com/mattmoor/dep-collector",
]

[prune]
Expand Down
14 changes: 8 additions & 6 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Load github.com/knative/test-infra/images/prow-tests/scripts/library.sh
[ -f /workspace/library.sh ] \
&& source /workspace/library.sh \
|| eval "$(docker run --entrypoint sh gcr.io/knative-tests/test-infra/prow-tests -c 'cat library.sh')"
[ -v KNATIVE_TEST_INFRA ] || exit 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line breaks mac.

./hack/../hack/update-deps.sh: line 21: [: -v: unary operator expected

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever check for env var KNATIVE_TEST_INFRA that works on Mac and Linux is fine.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking into it a little, -v is just not supported on macs default bash install.

Copy link
Copy Markdown
Contributor Author

@adrcunha adrcunha Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're in a hurry, simply replace that with a check that $KNATIVE_TEST_INFRA is defined. If you can wait a little bit, now that things are stable I'm gonna vendor the test-infra repo so this check will go away.


set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..

pushd ${SCRIPT_ROOT}
trap popd EXIT
cd ${REPO_ROOT_DIR}

# Ensure we have everything we need under vendor/
dep ensure

rm -rf $(find vendor/ -name 'BUILD')
rm -rf $(find vendor/ -name 'BUILD.bazel')

# Run dep-collector to update our VENDOR-LICENSE
go run ./vendor/github.com/mattmoor/dep-collector/*.go ./cmd/* > third_party/VENDOR-LICENSE
update_licenses third_party/VENDOR-LICENSE "./cmd/*"
2 changes: 1 addition & 1 deletion test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function build_tests() {
# Fetch the google/licenseclassifier for its license db
go get github.com/google/licenseclassifier || return 1
# Check that we don't have any forbidden licenses in our images.
go run ./vendor/github.com/mattmoor/dep-collector/*.go -check ./cmd/* || result=1
dep-collector -check ./cmd/* || result=1
return ${result}
}

Expand Down