Use gox to cross-compile #274

Merged
6543 merged 6 commits from goreleaser into master 2020-12-08 17:45:49 +00:00

fix #255

Note: dist filenames may be different than before, perhaps there should be a new make command to rename the files to be what should be expected?

This is also just a middlestep to rm xgo, another refactor of this could switch to use goreleaser

fix #255 Note: dist filenames may be different than before, perhaps there should be a new make command to rename the files to be what should be expected? This is also just a middlestep to rm xgo, another refactor of this could switch to use goreleaser
techknowlogick added 4 commits 2020-12-07 02:40:54 +00:00
use gox for cross-compile
Some checks failed
continuous-integration/drone/push Build is failing
95ad6f7e2b
use xgo base image
Some checks failed
continuous-integration/drone/push Build is failing
ee998e80e5
correct flags for gox
Some checks reported errors
continuous-integration/drone/push Build was killed
9780f2308e
no need to test drone anymore
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build is passing
edb0e0e797
techknowlogick added the
kind
refactor
label 2020-12-07 02:42:34 +00:00
techknowlogick added this to the v0.6.0 milestone 2020-12-07 02:42:37 +00:00
techknowlogick added the
status/needs-reviews
label 2020-12-07 02:42:55 +00:00
6543 added 1 commit 2020-12-07 12:34:02 +00:00
Merge branch 'master' into goreleaser
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build is passing
e5393901c9
Owner
> make release-os
go: github.com/mitchellh/gox upgrade => v1.0.1
go: github.com/hashicorp/go-version upgrade => v1.2.1
CGO_ENABLED=0 gox -verbose -cgo=false -tags '' -ldflags '-s -w -X "main.Version=0.5.0+32-ge539390" -X "main.Tags="' -osarch='!darwin/386 !darwin/arm64 !darwin/arm' -os="windows linux darwin" -arch="386 amd64 arm arm64" -output="dist/binaries/release/tea-master-{{.OS}}-{{.Arch}}"
/bin/sh: gox: command not found
make: *** [Makefile:152: release-os] Error 127
```sh > make release-os go: github.com/mitchellh/gox upgrade => v1.0.1 go: github.com/hashicorp/go-version upgrade => v1.2.1 CGO_ENABLED=0 gox -verbose -cgo=false -tags '' -ldflags '-s -w -X "main.Version=0.5.0+32-ge539390" -X "main.Tags="' -osarch='!darwin/386 !darwin/arm64 !darwin/arm' -os="windows linux darwin" -arch="386 amd64 arm arm64" -output="dist/binaries/release/tea-master-{{.OS}}-{{.Arch}}" /bin/sh: gox: command not found make: *** [Makefile:152: release-os] Error 127 ```
Author
Owner

It's the same go get logic that we had for xgo, so likely it failed already just no one noticed because we may already have xgo installed locally.

@6543 could you try changing it from a go get -u to a go install to see if that works on your local?

It's the same go get logic that we had for xgo, so likely it failed already just no one noticed because we may already have xgo installed locally. @6543 could you try changing it from a `go get -u` to a `go install` to see if that works on your local?
Member

@techknowlogick yeah that worked for me ?

diff --git a/Makefile b/Makefile
index d419210..2cf4f55 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,7 @@ release-dirs:
 .PHONY: release-os
 release-os:
 	@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
-		cd /tmp && $(GO) get -u github.com/mitchellh/gox; \
+		cd /tmp && $(GO) install github.com/mitchellh/gox; \
 	fi
 	CGO_ENABLED=0 gox -verbose -cgo=false -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -osarch='!darwin/386 !darwin/arm64 !darwin/arm' -os="windows linux darwin" -arch="386 amd64 arm arm64" -output="$(DIST)/binaries/release/tea-$(VERSION)-{{.OS}}-{{.Arch}}"
 
@techknowlogick yeah that worked for me ? ```diff diff --git a/Makefile b/Makefile index d419210..2cf4f55 100644 --- a/Makefile +++ b/Makefile @@ -149,7 +149,7 @@ release-dirs: .PHONY: release-os release-os: @hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - cd /tmp && $(GO) get -u github.com/mitchellh/gox; \ + cd /tmp && $(GO) install github.com/mitchellh/gox; \ fi CGO_ENABLED=0 gox -verbose -cgo=false -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -osarch='!darwin/386 !darwin/arm64 !darwin/arm' -os="windows linux darwin" -arch="386 amd64 arm arm64" -output="$(DIST)/binaries/release/tea-$(VERSION)-{{.OS}}-{{.Arch}}" ```
6543 added 1 commit 2020-12-08 14:55:38 +00:00
Merge branch 'master' into goreleaser
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
fb8a598373
Owner

on my laptop go get -u works and go install dont

so it looks system specific ...

on my laptop `go get -u` works and `go install` dont so it looks system specific ...
6543 approved these changes 2020-12-08 15:21:41 +00:00
Dismissed
Author
Owner

could be related to go version and if you are cloning into gopath or not.

could be related to go version and if you are cloning into gopath or not.
noerw approved these changes 2020-12-08 17:44:53 +00:00
Dismissed
noerw added
kind/build
and removed
status/needs-reviews
labels 2020-12-08 17:45:06 +00:00
Owner

could be related to go version and if you are cloning into gopath or not.

I always try to run with latest stable (go1.15.6 at the moment)

> could be related to go version and if you are cloning into gopath or not. I always try to run with latest stable (go1.15.6 at the moment)
6543 merged commit 3acd42f8d7 into master 2020-12-08 17:45:49 +00:00
Member

I'm on go 1.13.5 and have the tea repo in $GOPATH/src/code.gitea.io/tea

I'm on go 1.13.5 and have the tea repo in `$GOPATH/src/code.gitea.io/tea`
6543 deleted branch goreleaser 2020-12-08 17:48:48 +00:00
Sign in to join this conversation.
No description provided.