Skip to content
Closed
Show file tree
Hide file tree
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 scripts/build/binary
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env sh

source ./scripts/build/ldflags
. ./scripts/build/ldflags

go build -o ./build/docker --ldflags "${LDFLAGS}" github.com/docker/cli/cmd/docker
CGO_ENABLED=0 go build -o ./build/docker --ldflags "${LDFLAGS}" github.com/docker/cli/cmd/docker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think CGO_ENABLED is already set in the Dockerfiles, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but these scripts are invoked from make outside the Dockerfiles too so builds not using Docker won't work without this setting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, this is also fixed in #78

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool @dnephin do you want me to remove that change from this pr?

4 changes: 2 additions & 2 deletions scripts/build/cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env sh

source ./scripts/build/ldflags
. ./scripts/build/ldflags

gox -output build/docker-{{.OS}}-{{.Arch}} \
CGO_ENABLED=0 gox -output build/docker-{{.OS}}-{{.Arch}} \
-osarch="linux/arm linux/amd64 darwin/amd64 windows/amd64" \
--ldflags "${LDFLAGS}" \
github.com/docker/cli/cmd/docker
2 changes: 1 addition & 1 deletion scripts/build/ldflags
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

VERSION=${VERSION:-"unknown-version"}
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
Expand Down