Skip to content

Commit

Permalink
chore: dont assume a file extension when running no-cmd tasks (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
notnmeyer authored Mar 29, 2024
1 parent 5758e11 commit f044408
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/tasks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cmds = [
"echo \"my pwd is $(pwd)\"", # you can use subshells
]

# when `cmds` are omitted tsk attempts to run a script located at `scripts/<task_name>.sh`
# when `cmds` are omitted tsk attempts to run a script located at `tsk/<task_name>`
[tasks.no_cmd]
env = {
GREETING = "Hello",
Expand Down
2 changes: 1 addition & 1 deletion internal/task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (exec *Executor) ListTasksFromTaskFile(regex *regexp.Regexp) {
fmt.Printf("%s\n", indent+indent+cmd)
}
} else {
fmt.Printf("%s# will run `%s/%s.sh`\n", indent, exec.Config.ScriptDir, name)
fmt.Printf("%s# will run `%s/%s`\n", indent, exec.Config.ScriptDir, name)
}

// dir
Expand Down
5 changes: 5 additions & 0 deletions tasks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ cmds = ["go mod tidy"]

[tasks.install_release]
# see scripts/install_release.sh for configurable env arguments
description = '''
Downloads the specified release and installs it to ~/bin.
usage: version=0.8.1 platform=Darwin arch=arm64 tsk install_release
'''

[tasks.sign]
dotenv = ".env"
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit f044408

Please sign in to comment.