mirror of https://github.com/linkerd/linkerd2.git
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.
This commit is contained in:
parent
d43ec41574
commit
ca1a9f66d2
|
@ -9,7 +9,6 @@ web/web
|
||||||
**/node_modules
|
**/node_modules
|
||||||
web/app/dist
|
web/app/dist
|
||||||
web/app/yarn-error.log
|
web/app/yarn-error.log
|
||||||
.gorun
|
|
||||||
**/*.gogen*
|
**/*.gogen*
|
||||||
**/*.swp
|
**/*.swp
|
||||||
charts/**/charts
|
charts/**/charts
|
||||||
|
|
|
@ -12,6 +12,7 @@ fi
|
||||||
|
|
||||||
version=$("$bindir"/root-tag)
|
version=$("$bindir"/root-tag)
|
||||||
ldflags="-X github.com/linkerd/linkerd2/pkg/version.Version=$version"
|
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
|
shift
|
||||||
exec ./.gorun "$@"
|
exec ./target/go-run "$@"
|
||||||
|
|
Loading…
Reference in New Issue