leaanthony
leaanthony
TTask
Created by leaanthony on 11/15/2023 in #help
Default to $GOARCH
Seems like a daft question: How can I pass a custom arch to a task but have that task default to $GOARCH? I've tried:
build:
cmds:
- GOOS=darwin GOARCH={{.ARCH}} go build -tags production -ldflags="-w -s" -o build/bin/{{.APP_NAME}}
vars:
ARCH: $GOARCH
build:
cmds:
- GOOS=darwin GOARCH={{.ARCH}} go build -tags production -ldflags="-w -s" -o build/bin/{{.APP_NAME}}
vars:
ARCH: $GOARCH
Can't seem to find anything in the docs about it
3 replies
TTask
Created by leaanthony on 10/29/2023 in #help
Bizarre build error
Had someone send over an issue stating the task module was failing to build on Linux. Works fine on Windows. The error is:
light@pc:~/repos/wails/v3/cmd/wails3$ go install
go: downloading github.com/go-task/task/v3 v3.31.0
go: downloading github.com/jaypipes/ghw v0.12.0
go: downloading github.com/jaypipes/pcidb v1.0.0
go: downloading github.com/ghodss/yaml v1.0.0
# github.com/go-task/task/v3/internal/orderedmap
/home/light/go/pkg/mod/github.com/go-task/task/[email protected]/internal/orderedmap/orderedmap.go:94:24: type func(i K, j K) bool of less does not match inferred type func(a K, b K) int for func(a E, b E) int
light@pc:~/repos/wails/v3/cmd/wails3$ go install
go: downloading github.com/go-task/task/v3 v3.31.0
go: downloading github.com/jaypipes/ghw v0.12.0
go: downloading github.com/jaypipes/pcidb v1.0.0
go: downloading github.com/ghodss/yaml v1.0.0
# github.com/go-task/task/v3/internal/orderedmap
/home/light/go/pkg/mod/github.com/go-task/task/[email protected]/internal/orderedmap/orderedmap.go:94:24: type func(i K, j K) bool of less does not match inferred type func(a K, b K) int for func(a E, b E) int
Turns out there is a post out there in the big wide world where someone has exactly the same error. Works fine on my windows machine. Have you seen this? https://www.spinics.net/lists/fedora-devel/msg316093.html
3 replies
TTask
Created by leaanthony on 1/22/2023 in #help
Embedding the CLI
I'm looking at using task as the main task orchestrator for Wails v3. I've been looking at the options for task.Executor and have something reasonable up and running. Ideally, I'd like to give Wails users the full power of the task CLI so have looked at what it might mean to "pass through" the cli args to the current task cli main method. The only issues I can see are an internal logger package and tricking Cobra into trimming the first arg out. So the options seem to be: 1. Hack the current task cli main method so I can call it with pass through args 2. Reimplement the main method and try to keep parity with task releases 3. Create a public method in task that accepts a []string of args that gets processed by Cobra which external apps can hook into Just wondering what your recommendation might be. Thanks 👍 PS: I'm aware this is a very specialist request so "you're on your own" is a valid response 😂
2 replies
TTask
Created by leaanthony on 1/21/2023 in #help
generates directive on `node_modules` directory
I'm trying to work out how to run npm install but only when the following is true: package.json has been updated OR node_modules directory doesn't exist. I can make the first condition work but not both. Many thanks!
4 replies