trim21
trim21
TTask
Created by trim21 on 10/10/2024 in #help
variable for current taskfile?
thanks
3 replies
TTask
Created by trim21 on 6/17/2024 in #help
how task kill process?
this is my testing program:
package main

import (
"fmt"
"os"
"os/signal"
"syscall"
)

func main() {
signalChan := make(chan os.Signal, 1)

signal.Notify(
signalChan,
os.Interrupt,
os.Kill,
syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGQUIT,
syscall.SIGKILL,
syscall.SIGTERM,
)

<-signalChan
fmt.Println("shutting down...")
}
package main

import (
"fmt"
"os"
"os/signal"
"syscall"
)

func main() {
signalChan := make(chan os.Signal, 1)

signal.Notify(
signalChan,
os.Interrupt,
os.Kill,
syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGQUIT,
syscall.SIGKILL,
syscall.SIGTERM,
)

<-signalChan
fmt.Println("shutting down...")
}
taskfile:
build:test:
sources:
- '**/*.go'
- 'go.sum'
- 'go.mod'
generates:
- tmp/a.exe
cmd: go build -o tmp/a.exe

test:
deps: [ build:test ]
cmds:
- cp tmp/a.exe tmp/test.exe
- tmp/test.exe
build:test:
sources:
- '**/*.go'
- 'go.sum'
- 'go.mod'
generates:
- tmp/a.exe
cmd: go build -o tmp/a.exe

test:
deps: [ build:test ]
cmds:
- cp tmp/a.exe tmp/test.exe
- tmp/test.exe
running on win32
2 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
thanks anyway
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
just read the source and find that I can use *.{so,pyd} in this case
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
not an ideal solution althrough
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
thanks
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
anyway I can workaround this? looks like I'll have to write 2 internal task for this?
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
make sense
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
of is this expected behavior or it's a bug?
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
generates:
- ./src/**/*.so #
- ./src/**/*.pyd # windows
generates:
- ./src/**/*.so #
- ./src/**/*.pyd # windows
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
but the file it generated is platform-specific, any way I can workaround this?
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
so it always consider out of date
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
OK, I find reason. I have a glob defined in generated doesn't match any files.
16 replies
TTask
Created by trim21 on 5/17/2024 in #help
is it possible to set vars in cmds?
bump:
cmds:
- poetry version {{.CLI_ARGS}}
- git add pyproject.toml
- task: bump-commit

bump-commit:
internal: true
vars:
VERSION:
sh: poetry version -s
cmds:
- 'git commit -m "bump: {{.VERSION}}"'
- 'git tag "v{{.VERSION}}" -m "v{{.VERSION}}"'
bump:
cmds:
- poetry version {{.CLI_ARGS}}
- git add pyproject.toml
- task: bump-commit

bump-commit:
internal: true
vars:
VERSION:
sh: poetry version -s
cmds:
- 'git commit -m "bump: {{.VERSION}}"'
- 'git tag "v{{.VERSION}}" -m "v{{.VERSION}}"'
3 replies
TTask
Created by trim21 on 5/17/2024 in #help
is it possible to set vars in cmds?
this can be done by adding a internal task:
3 replies
TTask
Created by trim21 on 4/25/2024 in #help
how to apply `ignore` in source filter?
thands
4 replies
TTask
Created by trim21 on 4/25/2024 in #help
how to apply `ignore` in source filter?
.venv directory holds package files, it's a very deep file tree may contains .py file...
4 replies