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 <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2023-02-04 16:15:54 +00:00
parent 98dc5a86cc
commit 95e9bf2a15
2 changed files with 1 additions and 7 deletions

1
.gitignore vendored
View File

@ -33,7 +33,6 @@
/third_party/vulkan_memory_allocator /third_party/vulkan_memory_allocator
/third_party/webgpu-cts /third_party/webgpu-cts
/third_party/zlib /third_party/zlib
/tools/bin
/tools/clang /tools/clang
/tools/cmake* /tools/cmake*
/tools/golang /tools/golang

View File

@ -17,7 +17,6 @@ set -e # Fail on any error.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
TOOL="$1" TOOL="$1"
BINARY="${SCRIPT_DIR}/bin/${TOOL}"
if [ ! -x "$(which go)" ] ; then if [ ! -x "$(which go)" ] ; then
echo "error: go needs to be on \$PATH to use $0" 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 show_usage
fi fi
# Rebuild the binary.
# Note, go caches build artifacts, so this is quick for repeat calls
pushd "${SCRIPT_DIR}/src" > /dev/null pushd "${SCRIPT_DIR}/src" > /dev/null
go build -o "${BINARY}" "./cmd/${TOOL}" go run "./cmd/${TOOL}" "${@:2}"
popd > /dev/null popd > /dev/null
"${BINARY}" "${@:2}"