Skip to content

Commit

Permalink
Revert "Define scripts/ as a submodule (#2141)" (#2185)
Browse files Browse the repository at this point in the history
This reverts commit 8b4a528.
  • Loading branch information
chizhg committed Jun 10, 2020
1 parent 8b4a528 commit f0f63d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
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

0 comments on commit f0f63d4

Please sign in to comment.