mirror of https://github.com/linkerd/linkerd2.git
17 lines
349 B
Bash
Executable File
17 lines
349 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
cd "$(pwd -P)"
|
|
|
|
bindir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
echo "Usage: bin/go-run path/to/main [args]" >&2
|
|
exit 1
|
|
fi
|
|
|
|
ldflags="-X github.com/linkerd/linkerd2/pkg/version.Version=$($bindir/root-tag)"
|
|
go build -v -i -race -o .gorun -ldflags "$ldflags" "./$1"
|
|
shift
|
|
exec ./.gorun "$@"
|