From ca1a9f66d21c66bb3baeea25061147db5a057d55 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Tue, 23 Jun 2020 15:55:34 -0700 Subject: [PATCH] go-run: Move temporary binary into `target` directory (#4657) The `bin/go-run` script generates a temporary binary, stored in the root of the repository. This change moves it into `target/` so that is included in the .dockerignore, and so that the repo can be cleaned easily by removing the `target/` directory. --- .gitignore | 1 - bin/go-run | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 151f8553d..0b014bc00 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ web/web **/node_modules web/app/dist web/app/yarn-error.log -.gorun **/*.gogen* **/*.swp charts/**/charts diff --git a/bin/go-run b/bin/go-run index 65efd921d..755851301 100755 --- a/bin/go-run +++ b/bin/go-run @@ -12,6 +12,7 @@ fi version=$("$bindir"/root-tag) ldflags="-X github.com/linkerd/linkerd2/pkg/version.Version=$version" -GO111MODULE=on go build -v -mod=readonly -race -o .gorun -ldflags "$ldflags" "./$1" +mkdir -p target +GO111MODULE=on go build -v -mod=readonly -race -o ./target/go-run -ldflags "$ldflags" "./$1" shift -exec ./.gorun "$@" +exec ./target/go-run "$@"