andreynering
[Question] Best practice around "remote" taskfiles
Hi @leaanthony. Sorry for the wait, it was a holiday here in Brazil in the past days, so I was OOO.
I don't have the full context of what you're trying to do at Wails, but from what I could understand, I'd say it'd be better to disallow remote Taskfiles or vendor them somehow so we avoid issues with synchronization. If the plugin version differs from remote, you could have issues.
3 replies
How to reuse code in taskfile?
3. You might be interested into this proposal: https://github.com/go-task/task/issues/448
11 replies
Convert string variable to integer
Hi @Rots,
Yes, take a look at this page: https://go-task.github.io/slim-sprig/conversion.html
3 replies
Watching golang source w net/http server
Hi @dNaszta,
Task's watcher is not 100% polished, so it may fail in some scenarios.
I suggest you to try dedicated tools like Air (https://github.com/air-verse/air). Both tools can be used together.
4 replies
Parentheses in commands
@ibragdzh This page has some explanation on how to declare multi-line string in YAML: https://yaml-multiline.info/ Using
|
is probably what you want.9 replies
Is it possible to to specify a Go version in a Taskfile?
Hi @HighDesertStorm,
Your Taskfile will call whatever
go
binary is available in your PATH
. You can call go version
to know its version. If you want a different version, you'll need to install it yourself.5 replies
variable for current taskfile?
Hi @trim21,
Take a look at the special variables, specially
ROOT_DIR
, TASKFILE_DIR
and USER_WORKING_DIR
.
https://taskfile.dev/reference/templating/#special-variables3 replies
Using sh to generate a map?
Hi @JonZeolla,
I suggest you do make a comment on https://github.com/go-task/task/issues/1585 with your proposal.
There, it would be less likely to be forgotten, as Discord is more for questions than feature requests.
2 replies
Required input does not prevent dependencies from running and dependencies do not share variables
Hi @Bluestopher,
1. I would move
DATE
and GIT_HASH
as global variables, and just reference them on the calls with DATE: '{{.DATE}}'
2. You might want to create an issue about this so we can think about changing this behavior in the future.3 replies