Skip to content

Commit

Permalink
Source Knative hack scripts using a binary
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Ok <[email protected]>
  • Loading branch information
aliok committed Jan 7, 2025
1 parent 8b7020c commit c34a297
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Documentation about this script and how to use it can be found
# at https://github.com/knative/test-infra/tree/master/ci

source $(dirname $0)/../vendor/knative.dev/hack/release.sh
source "$(go run knative.dev/hack/cmd/script library.sh)"
source $(dirname $0)/artifacts-env.sh

export GO111MODULE=on
Expand Down
1 change: 1 addition & 0 deletions hack/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package tools
import (
_ "knative.dev/eventing/hack"
_ "knative.dev/hack"
_ "knative.dev/hack/cmd/script" // Allow calling embedded scripts from hack
_ "knative.dev/pkg/hack"

// eventshub is a cloudevents sender/receiver utility for e2e testing.
Expand Down
2 changes: 1 addition & 1 deletion hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname "$0")/../vendor/knative.dev/hack/library.sh
source "$(go run knative.dev/hack/cmd/script library.sh)"

go_update_deps "$@"
2 changes: 1 addition & 1 deletion hack/update-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname "$0")/../vendor/knative.dev/hack/library.sh
source "$(go run knative.dev/hack/cmd/script library.sh)"

readonly FUNC_BINARY_DIR="$(mktemp -d ${REPO_ROOT_DIR}/tmpfuncdir.XXXXXX)"

Expand Down
2 changes: 1 addition & 1 deletion hack/verify-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname "$0")/../vendor/knative.dev/hack/library.sh
source "$(go run knative.dev/hack/cmd/script library.sh)"

"${REPO_ROOT_DIR}/hack/verify-templates.sh"
"${REPO_ROOT_DIR}/hack/verify-deps.sh"
2 changes: 1 addition & 1 deletion hack/verify-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname "$0")/../vendor/knative.dev/hack/library.sh
source "$(go run knative.dev/hack/cmd/script library.sh)"

readonly TMP_DIFFROOT="$(mktemp -d ${REPO_ROOT_DIR}/tmpdepsdiffroot.XXXXXX)"

Expand Down
2 changes: 1 addition & 1 deletion hack/verify-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname "$0")/../vendor/knative.dev/hack/library.sh
source "$(go run knative.dev/hack/cmd/script library.sh)"

readonly TMP_DIFFROOT="$(mktemp -d ${REPO_ROOT_DIR}/tmptemplatesdiffroot.XXXXXX)"

Expand Down
2 changes: 1 addition & 1 deletion test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export KO_FLAGS="${KO_FLAGS:-}"

repo_root_dir=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/..

source "${repo_root_dir}"/vendor/knative.dev/hack/e2e-tests.sh
source "$(go run knative.dev/hack/cmd/script e2e-tests.sh)"
source "${repo_root_dir}"/hack/control-plane.sh
source "${repo_root_dir}"/hack/artifacts-env.sh

Expand Down
2 changes: 1 addition & 1 deletion test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
export GO111MODULE=on
export DISABLE_MD_LINTING=1

source $(dirname "$0")/../vendor/knative.dev/hack/presubmit-tests.sh
source "$(go run knative.dev/hack/cmd/script presubmit-tests.sh)"

function unit_tests() {
header "Running Go unit tests"
Expand Down

0 comments on commit c34a297

Please sign in to comment.