Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

let windows binary release have the file extension ".exe" #1295

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -66,8 +66,8 @@ jobs:
- release/dep-linux-amd64.sha256
- release/dep-darwin-amd64
- release/dep-darwin-amd64.sha256
- release/dep-windows-amd64
- release/dep-windows-amd64.sha256
- release/dep-windows-amd64.exe
- release/dep-windows-amd64.exe.sha256
skip_cleanup: true
on:
repo: golang/dep
8 changes: 6 additions & 2 deletions hack/build-all.bash
Original file line number Diff line number Diff line change
@@ -17,6 +17,9 @@ DATE=$(date "+%Y-%m-%d")
GO_BUILD_CMD="go build -a -installsuffix cgo"
GO_BUILD_LDFLAGS="-s -w -X main.commitHash=$COMMIT_HASH -X main.buildDate=$DATE -X main.version=$VERSION"

declare -A PLATFORM_FILE_EXTENSIONS
PLATFORM_FILE_EXTENSIONS["windows"]=.exe

if [ -z "$DEP_BUILD_PLATFORMS" ]; then
DEP_BUILD_PLATFORMS="linux windows darwin"
fi
@@ -30,8 +33,9 @@ mkdir -p release
for OS in ${DEP_BUILD_PLATFORMS[@]}; do
for ARCH in ${DEP_BUILD_ARCHS[@]}; do
echo "Building for $OS/$ARCH"
BINARY="dep-$OS-$ARCH${PLATFORM_FILE_EXTENSIONS[$OS]}"
GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 $GO_BUILD_CMD -ldflags "$GO_BUILD_LDFLAGS"\
-o "release/dep-$OS-$ARCH" ./cmd/dep/
shasum -a 256 "release/dep-$OS-$ARCH" > "release/dep-$OS-$ARCH".sha256
-o "release/${BINARY}" ./cmd/dep/
shasum -a 256 "release/${BINARY}" > "release/${BINARY}".sha256
done
done