Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Define scripts/ as a submodule" #2185

Merged
merged 1 commit into from
Jun 10, 2020
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
14 changes: 9 additions & 5 deletions scripts/dummy.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
// +build tools

/*
Copyright 2018 The Knative Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -17,3 +12,12 @@ limitations under the License.
*/

package scripts

import (
"fmt"
)

func main() {
fmt.Println("This is a dummy go file so `go dep` can be used with knative/test-infra/scripts")
fmt.Println("This file can be safely removed if one day this directory contains real, useful go code")
}
3 changes: 0 additions & 3 deletions scripts/go.mod

This file was deleted.

7 changes: 3 additions & 4 deletions scripts/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,12 @@ function default_build_test_runner() {
# Consider an error message everything that's not a package name.
errors_go1="$(grep -v '^\(github\.com\|knative\.dev\)/' "${report}" | sort | uniq)"
fi
# Get all packages that have build tags in go code (ignore /vendor, /hack, /scripts and /third_party)
# TODO(chizhg): currently it assumes all these packages are test packages, support building normal go packages when we need to.
# Get all build tags in go code (ignore /vendor, /hack and /third_party)
local tags="$(grep -r '// +build' . \
| grep -v '^./vendor/' | grep -v '^./hack/' | grep -v '^./third_party' | grep -v '^./scripts' \
| grep -v '^./vendor/' | grep -v '^./hack/' | grep -v '^./third_party' \
| cut -f3 -d' ' | sort | uniq | tr '\n' ' ')"
local tagged_pkgs="$(grep -r '// +build' . \
| grep -v '^./vendor/' | grep -v '^./hack/' | grep -v '^./third_party' | grep -v '^./scripts' \
| grep -v '^./vendor/' | grep -v '^./hack/' | grep -v '^./third_party' \
| grep ":// +build " | cut -f1 -d: | xargs dirname \
| sort | uniq | tr '\n' ' ')"
for pkg in ${tagged_pkgs}; do
Expand Down