1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-26 06:07:05 +01:00

Merge pull request #141 from lafriks/patch-1

For windows release binary should be named drone.exe
This commit is contained in:
Brad Rydzewski 2019-08-07 09:18:34 -07:00 committed by GitHub
commit 4bac1b3045
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -6,17 +6,17 @@ set -x
export CGO_ENABLED=0
# compile for all architectures
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/amd64/drone github.com/drone/drone-cli/drone
GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/arm64/drone github.com/drone/drone-cli/drone
GOOS=linux GOARCH=arm go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/arm/drone github.com/drone/drone-cli/drone
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/windows/amd64/drone github.com/drone/drone-cli/drone
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/darwin/amd64/drone github.com/drone/drone-cli/drone
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/amd64/drone github.com/drone/drone-cli/drone
GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/arm64/drone github.com/drone/drone-cli/drone
GOOS=linux GOARCH=arm go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/arm/drone github.com/drone/drone-cli/drone
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/windows/amd64/drone.exe github.com/drone/drone-cli/drone
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/darwin/amd64/drone github.com/drone/drone-cli/drone
# tar binary files prior to upload
tar -cvzf release/drone_linux_amd64.tar.gz -C release/linux/amd64 drone
tar -cvzf release/drone_linux_arm64.tar.gz -C release/linux/arm64 drone
tar -cvzf release/drone_linux_arm.tar.gz -C release/linux/arm drone
tar -cvzf release/drone_windows_amd64.tar.gz -C release/windows/amd64 drone
tar -cvzf release/drone_windows_amd64.tar.gz -C release/windows/amd64 drone.exe
tar -cvzf release/drone_darwin_amd64.tar.gz -C release/darwin/amd64 drone
# generate shas for tar files