laher / goxc

a build tool for Go, with a focus on cross-compiling, packaging and deployment
1.68k stars 79 forks source link

Tasks not found on windows amd64/Go 1.5 beta1 #78

Closed drewwells closed 8 years ago

drewwells commented 9 years ago

I'm seeing some strange errors on appveyor. Software builds fine with go build, but throws architecture and tasks errors when I try to use goxc.

I'm using appveyor, so windows version is 2012 (I think) and Go 1.5 beta1 with a cgo based project.

goxc -help tasks
Use commandline arguments to specify tasks, or '-tasks-=' or '-tasks+=' to adjust them.

e.g. to run all the 'default' tasks skipping 'rmbin' and appending 'go-fmt':
    `goxc -tasks+=go-fmt -tasks-=rmbin default`

Available tasks & aliases (specify aliases where possible):
 copy-resources  Copy resources
 deb-source      Build a source package. Currently only supports 'source deb' format for Debian/Ubuntu Linux.
 toolchain       Build toolchain. Make sure to run this each time you update go source.
 xc              Cross compile. Builds executables for other platforms.
 publish-github  Upload artifacts to github.com, and generate a local markdown page of links (github project details required in goxc config. See `goxc -h publish-github`)
 clean-destination  Delete the output directory for this version of the artifact.
 codesign        sign code for Mac. Only Mac hosts are supported for this task.
 downloads-page  Generate a downloads page from a template. Default outputs a Markdown page.
 go-vet          runs `go vet ./...`.
 rmbin           delete binary. Normally runs after 'archive' task to reduce size of output dir.
 archive-tar-gz  Create a compressed archive. Linux-only by default
 bintray         Upload artifacts to bintray.com, and generate a local markdown page of links (bintray registration details required in goxc config. See `goxc -h bintray`)
 bump            bump package version in .goxc.json. By default, the patch number (after the second dot) is increased by one. You can specify major or minor instead with -dot=0 or -dot=1
 go-test         runs `go test ./...`. (dir is configurable).
 go-install      runs `go install`. installs a version consistent with goxc-built binaries.
 publish-http    Upload artifacts to an HTTP server using a PUT request. Configuration required, see `goxc -h http` output.
 interpolate-source  Replaces a given constant/var value with the current version.
 archive-zip     Create a zip archive. By default, 'zip' format is used for all platforms except Linux
 deb-dev         Build a '-dev.deb' sources package for use as a Debian/Ubuntu Linux dependency.
 deb             Build a .deb package for Debian/Ubuntu Linux.
 go-clean        runs `go clean`.
 go-fmt          runs `go fmt ./...`.
 tag             tag repository according to package version.
 all             alias: [toolchain go-fmt publish-github go-vet go-test go-install xc codesign copy-resources archive-zip archive-tar-gz deb deb-dev rmbin downloads-page]
 archive         alias: [archive-zip archive-tar-gz]
 clean           alias: [go-clean clean-destination]
 compile         alias: [go-install xc codesign copy-resources]
 default         alias: [go-vet go-test go-install xc codesign copy-resources archive-zip archive-tar-gz deb deb-dev rmbin downloads-page]
 pkg-build       alias: [deb deb-dev]
 pkg-source      alias: [deb-source]
 validate        alias: [go-vet go-test]
 package         alias: [archive-zip archive-tar-gz deb deb-dev rmbin downloads-page]
goxc -tasks='archive-zip' -build-ldflags "-X github.com/wellington/wellington/version.Version=%WIN_VER%" -bc='windows' -arch='amd64' -wd=wt -d=. -n wt
[goxc] 2015/07/12 06:11:54 WARNING: Architecture ''amd64'' is unsupported
[goxc] 2015/07/12 06:11:54 WARNING: no valid platforms specified
[goxc] 2015/07/12 06:11:54 RunTasks error: Task ''archive-zip'' does not exist
Command exited with code 1
drewwells commented 9 years ago

I tried again with a full toolchain build goxc -t and the architecture error went away, but task still errored

https://ci.appveyor.com/project/drewwells/wellington/build/81

[goxc:toolchain] 2015/07/12 06:37:29 Task toolchain succeeded
goxc -tasks='archive' -build-ldflags "-X github.com/wellington/wellington/version.Version=%WIN_VER%" -bc='windows' -wd=wt -d=. -n wt
[goxc] 2015/07/12 06:37:29 RunTasks error: Task ''archive'' does not exist
Command exited with code 1
laher commented 9 years ago

Sorry for not getting back to you on this. Busy month last month.

So, I think the latest issue was just the use of quotes. -tasks=archive should do it.

laher commented 8 years ago

Closing - see above comment