From 95e9bf2a15296bed1e228269be674d92baa1b2fc Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Sat, 4 Feb 2023 16:15:54 +0000 Subject: [PATCH] tools/run: Remove 'bin' cache People keep on running the executable from the bin cache, wondering why stuff is out of date. `go run` has pretty decent builtin caching, so just use that. Change-Id: I6305a222f3f6b5b0b1ce23d7a89227aea96b9ef4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118720 Reviewed-by: Dan Sinclair Kokoro: Ben Clayton Auto-Submit: Ben Clayton Commit-Queue: Ben Clayton --- .gitignore | 1 - tools/run | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 563775bdc2..70d0016503 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,6 @@ /third_party/vulkan_memory_allocator /third_party/webgpu-cts /third_party/zlib -/tools/bin /tools/clang /tools/cmake* /tools/golang diff --git a/tools/run b/tools/run index 65b998a691..ffcb9d89d2 100755 --- a/tools/run +++ b/tools/run @@ -17,7 +17,6 @@ set -e # Fail on any error. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" TOOL="$1" -BINARY="${SCRIPT_DIR}/bin/${TOOL}" if [ ! -x "$(which go)" ] ; then echo "error: go needs to be on \$PATH to use $0" @@ -46,10 +45,6 @@ if [ ! -d "${SCRIPT_DIR}/src/cmd/${TOOL}" ]; then show_usage fi -# Rebuild the binary. -# Note, go caches build artifacts, so this is quick for repeat calls pushd "${SCRIPT_DIR}/src" > /dev/null - go build -o "${BINARY}" "./cmd/${TOOL}" + go run "./cmd/${TOOL}" "${@:2}" popd > /dev/null - -"${BINARY}" "${@:2}"