Uses the current working directory to name the built binary

This patch allows `build.sh` to be used with terraform plugins to
easily create cross-platform packages, using the same method as the
terraform Makefile:

```
mkdir scripts
curl https://raw.githubusercontent.com/hashicorp/terraform/master/scripts/build.sh -o scripts/build.sh
TF_RELEASE=1 sh -c "scripts/build.sh"  # make bin
```
This commit is contained in:
Loren Gordon 2017-10-30 09:06:39 -04:00 committed by Martin Atkins
parent 288f7c00e4
commit 55d4e460de
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ gox \
-arch="${XC_ARCH}" \
-osarch="${XC_EXCLUDE_OSARCH}" \
-ldflags "${LD_FLAGS}" \
-output "pkg/{{.OS}}_{{.Arch}}/terraform" \
-output "pkg/{{.OS}}_{{.Arch}}/${PWD##*/}" \
.
# Move all the compiled things to the $GOPATH/bin