Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making cross compile independent of gox vender package #2047

Merged
merged 8 commits into from
Aug 28, 2019
Merged
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
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ clean:
goget-tools:
go get -u github.com/Masterminds/glide
# go get -u golang.org/x/lint/golint
go get -u github.com/mitchellh/gox
go get github.com/frapposelli/wwhrd
go get -u github.com/onsi/ginkgo/ginkgo
go get -u github.com/securego/gosec/cmd/gosec
Expand All @@ -82,7 +81,14 @@ test-coverage:
# compile for multiple platforms
.PHONY: cross
cross:
gox -osarch="darwin/amd64 linux/amd64 windows/amd64" -output="dist/bin/{{.OS}}-{{.Arch}}/odo" $(BUILD_FLAGS) ./cmd/odo/
@for platform in linux darwin windows ; do \
echo "Cross compiling $$platform-amd64 and placing binary at dist/bin/$$platform-amd64/"; \
if [ $$platform == "windows" ]; then \
GOARCH=amd64 GOOS=$$platform go build -o dist/bin/$$platform-amd64/odo.exe $(BUILD_FLAGS) ./cmd/odo/; \
else \
GOARCH=amd64 GOOS=$$platform go build -o dist/bin/$$platform-amd64/odo $(BUILD_FLAGS) ./cmd/odo/; \
fi \
done

.PHONY: generate-cli-structure
generate-cli-structure:
Expand Down
1 change: 0 additions & 1 deletion scripts/openshiftci-presubmit-unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ export CUSTOM_HOMEDIR=$ARTIFACTS_DIR
make test

# crosscompile and publish artifacts
go get -u github.com/mitchellh/gox
make cross
cp -r dist $ARTIFACTS_DIR