EXIT_CODE
special variable on defer:
when a command finishes
with a non-zero exit code (#1484, #1762 by @dorimon-1 and @andreynering).ALIAS
special variable, which will contain the alias used to
call the current task. Falls back to the task name. (#1764 by @DanStory).TASK_REMOTE_DIR
environment variable not working when the path was
absolute. (#1715 by @vmaerten).--completion
flag to
output completion scripts for various shells (#293, #1157 by @pd93).
completion
directory
are now deprecated.default
task (#1777, #1778 by @vmaerten).TASK_EXE
special variable (#1616, #1624 by @pd93 and @andreynering).#
(#1654 by @pd93).yaml
and json
keys are no longer available (#1654 by @pd93).TASK_REMOTE_DIR
environment variable to configure where cached
remote Taskfiles are stored (#1661 by @vmaerten).--clear-cache
flag to clear the cache of remote Taskfiles (#1639
by @vmaerten).riscv64
architecture on Linux (#1699 by
@mengzhuo).CLI_SILENT
and CLI_VERBOSE
variables (#1480, #1669 by @Vince-Smith).prompt:
feature (#1657 by @pd93).run: once
was set (#852, #1655 by @pd93).env:
weren't been
correctly exported (#1640, #1641 by @vmaerten and @andreynering).stdin
as input (#1593, #1623 by
@pd93).&
, (
or )
(#1551, #1584 by @andreynering).q
for template function shellQuote
(#1601, #1603 by @vergenzt)~
on ZSH completions (#1613 by @jwater7).includes
(#1610 by @vmaerten).TASKFILE_DIR
variable was sometimes incorrect (#1522,
#1523 by @pd93).TASKFILE
special variable that holds the root Taskfile path
(#1523 by @pd93).--list
flag (#1509, #1512 by @pd93, #1514, #1520 by
@pd93).requires
on the API docs (#1491 by
@teatimeguest).version: 2
schemas. See the
deprecation notice on our website
(#1197, #1447 by @pd93).spew
, which can be used to print variables for
debugging purposes (#1452 by @pd93).merge
, which can be used to merge any number of
map variables (#1438, #1464 by @pd93).call.Direct
became
call.Indirect
(#1459 by @pd93).read
and taskfile
packages and introduced
taskfile/ast
(#1450 by @pd93).ast.IncludedTaskfiles
renamed to ast.Includes
and orderedmap
package
renamed to omap
plus some internal refactor work (#1456 by @pd93).taskfile
file names (#1482 by
@xontab).ROOT_TASKFILE
special variable (#1468, #1469 by @pd93)..env
when the --dir
or --taskfile
flags were
used (#1478 by @pd93).aliases
to --json
flag output (#1430, #1431 by @pd93).CLI_FORCE
special variable containing whether the --force
or
--force-all
flags were set (#1412, #1434 by @pd93).sources:
by using exclude:
(#225,
#1324 by @pd93 and @andreynering).--timeout
flag to the
Remote Taskfiles experiment
(#1317, #1345 by @pd93).vars:
and env:
were being executed when they should
actually be skipped by platforms:
(#1273, #1377 by @andreynering).schema.json
to make silent
valid in cmds
that use for
(#1385,
#1386 by @iainvm).--no-status
flag to skip expensive status checks when running
task --list --json
(#1348, #1368 by @amancevice).--yes
flag for the
Remote Taskfiles experiment
(#1317, #1344 by @pd93).watch: true
in a task to automatically run it in watch
mode (#231, #1361 by @andreynering)..git
(like
.github
), for example, were also being ignored (#1356 by @butuzov).task --list
(#1343 by @blackjid).sources:
by replacing md5 with
XXH3 which is much faster. This is a soft breaking
change because checksums will be invalidated when upgrading to this release
(#1325 by @ReillyBrogan).--watch
mode (#1285, #1297 by
@FilipSolich).defer
on JSON Schema (#1288 by @calvinmclean and @andreynering).{{.USER_WORKING_DIR}}
in
combination with includes
(#1046, #1205, #1250, #1293, #1312, #1274 by
@andarto, #1309 by @andreynering).--status
flag. Running this flag should not have side-effects: it
should not update the checksum on .task
, only report its status (#1305,
#1307 by @visciang, #1313 by @andreynering).for
(#82, #1220 by @pd93).--exit-code
code flag was not returning the correct
exit code when calling commands indirectly (#1266, #1270 by @pd93).nil
panic when a dependency was commented out or left empty (#1263
by @neomantra).taskfile.yml
, taskfile.yaml
, taskfile.dist.yml
&
taskfile.dist.yaml
--experiments
flag to allow you to see which experiments are
enabled (#1242 by @pd93)..task
if the checksum has changed (#1185,
#1194 by @deviantintegral).version: 2
schema. This will be removed in the next major release
(#1197, #1198, #1199 by @pd93).prompt:
prop to set a warning prompt to be shown before running
a potential dangurous task (#100, #1163 by @MaxCheetham,
Documentation).cmd:
in a task, avoiding the more complex
cmds: []
when you have only a single command for that task (#1130, #1131 by
@timdp).silent:
when calling another tasks (#680, #1142 by @danquah).version
is omitted from a Taskfile (#1148,
#1149 by @pd93).master
to main
(#1049, #1048 by
@pd93)..hg
(Mercurial) to the list of ignored directories when using --watch
(#1098 by @misery).--sort
flag for use with --list
and --list-all
(#946, #1105 by
@pd93).Task now has an
official extension for Visual Studio Code
contributed by @pd93! :tada: The extension is maintained in a
new repository under the go-task
organization. We're looking to gather feedback from the community so please give
it a go and let us know what you think via a
discussion,
issue or on our
Discord!
NOTE: The extension requires v3.23.0 to be installed in order to work.
--json
flag output (#1056 by @pd93)task --init
from Taskfile.yaml
to
Taskfile.yml
(#1062 by @misitebao).splitArgs
template function
({{splitArgs "foo bar 'foo bar baz'"}}
) to ensure string is split as
arguments (#1040, #1059 by @dhanusaputra).{{.CHECKSUM}}
variable in status (#1076, #1080 by @pd93).--global
(-g
) flag that will run a Taskfile from your
$HOME
directory. This is useful to have automation that you can run from
anywhere in your system!
(Documentation, #1029
by @andreynering).error_only: true
on the group
output mode. This will
instruct Task to only print a command output if it returned with a non-zero
exit code (#664, #1022 by @jaedle)..task/checksum
file was sometimes not being created when
task also declares a status:
(#840, #1035 by @harelwa, #1037 by @pd93).run: once
(#715, #1025 by
@theunrepentantgeek).TASK_VERSION
special variable (#990, #1014 by @ja1code).FORCE_COLOR
support to force color output.
Usefull for environments without TTY (#1003 by @automation-stack)timestamp
mode (#976, #977 by @aminya).set
and
shopt
builtins (#908, #929 by @pd93,
Documentation).platforms:
attribute to task
and cmd
, so it's now possible to
choose in which platforms that given task or command will be run on. Possible
values are operating system (GOOS), architecture (GOARCH) or a combination of
the two. Example: platforms: [linux]
, platforms: [amd64]
or
platforms: [linux/amd64]
. Other platforms will be skipped (#978, #980 by
@leaanthony).Taskfile.yml
once we're done reading it (#963, #964
by @HeCorr).Taskfile_{{OS}}.yml
file
(#961, #971 by @pd93).--json
flag (alias -j
) with the intent to improve support for code
editors and add room to other possible integrations. This is basic for now,
but we plan to add more info in the near future (#936 by @davidalpert, #764).USER_WORKING_DIR
special variable was added to add even more flexibility for
monorepos (#289, #920).dotenv
support (#389, #904).includes
(#942, #943).task --list --silent
(task --ls
). This means that aliases
will be completed by the completion scripts (#919).--list
/--list-all
output (#806, #890).default
task in an included Taskfile by using
just the namespace. For example: docs:default
is now automatically aliased
to docs
(#661, #815).aliases
for tasks and namespaces (#268, #340, #879).interval: '500ms'
or using the --interval=500ms
flag (#813, #865).--list
, --list-all
and --summary
flags (#845,
#874).label:
was being shown instead of the task
name on --list
(#603, #877).npm
as new installation method: npm i -g @go-task/cli
(#870, #871,
npm package).--list
and --list-all
(#818).env:
introduced in the previous release
(#858, #866).CLI_ARGS
(--
) in Bash completion (#863).--list-all
with --list
as
already possible on the Bash completion (#861).ROOT_DIR
and TASKFILE_DIR
. This was a highly
requested feature (#215, #857,
Documentation).sources
(#826, #831)..task
directory location with the
TASK_TEMP_DIR
environment variable.TASK_COLOR_RESET
,
TASK_COLOR_BLUE
, TASK_COLOR_GREEN
, TASK_COLOR_CYAN
, TASK_COLOR_YELLOW
,
TASK_COLOR_MAGENTA
and TASK_COLOR_RED
(#568, #792).output: group
mode where STDOUT and STDERR were
being print in separated blocks instead of in the right order (#779).-n
as an alias to --dry
(#776, #777).--exit-code
(-x
) flag that will pass-through the exit form the
command being ran (#755).\r
because we were
only removing the final \n
but not \r\n
(#717).--list
and --list-all
flags can now be combined with the --silent
flag to print the task names only, without their description (#691).group
output mode, useful for grouping tasks in CI systems.
Check out the documentation
for more information (#647, #651).Taskfile.dist.yml
and Taskfile.dist.yaml
to the supported file name
list.
Check out the documentation
for more information (#498, #666).--list-all
(alias -a
) flag is now available. It's similar to the
exiting --list
(-l
) but prints all tasks, even those without a description
(#383, #401).defer:
keyword
(Documentation,
#475, #626).$
variable prefix and ^
command
prefix (#642, #644, #645)..yaml
extension (as an alternative to .yml
). This was
requested multiple times throughout the years. Enjoy! (#183, #184, #369, #584,
#621).{{.CLI_ARGS}}
argument to prevent one with spaces to become many
(#613).cmd:
was left empty (#612, #614).shellQuote
(#609,
mvdan/sh#763).shellQuote
function was added to the template system
({{shellQuote "a string"}}
) to ensure a string is safe for use in shell
(mvdan/sh#727,
mvdan/sh#737,
Documentation)read -p
flag is now supported (#314,
mvdan/sh#551,
mvdan/sh#772)pwd -P
and pwd -L
flags are now supported (#553,
mvdan/sh#724,
mvdan/sh#728)$GID
environment variable is now correctly being set (#561,
mvdan/sh#723)interactive: true
setting to improve support for interactive CLI apps
(#217, #563).nil
errors (#534, #573).~
(#539,
#557).run:
setting to control if tasks should run multiple times or not.
Available options are always
(the default), when_changed
(if a variable
modified the task) and once
(run only once no matter what). This is a long
time requested feature. Enjoy! (#53, #359).sources:
and status:
in the same task (#411, #427, #477).dotenv:
(#517).NO_COLOR
environment variable. (#459,
fatih/color#137).--watch
mode (#484, #485).--
and a special
CLI_ARGS
variable (#327).--concurrency
(alias -C
) flag, to limit the number of tasks that run
concurrently. This is useful for heavy workloads. (#345).--list
and --summary
by skipping running shell
variables for these flags (#332)..task
directory being created in the task directory instead of the
Taskfile directory (#247).sh:
) were not running
in the task directory when the task has a custom dir or it was in an included
Taskfile (#384).--watch
flag) got a few different bug fixes and
should be more stable now (#423, #365).label:
attribute (#412).set -e
is now automatically set on every command. This was done to fix an
issue where multiline string commands wouldn't really fail unless the sentence
was in the last line (#403).internal
directory (#358).v3
, all CLI variables will be considered global variables (#336, #341).env
like files (#324, #356).label:
to task so you can override the task name in the logs (#321,
#337).expansions
on v3 since it has no effect.Taskvars.yml
is not automatically included anymore.Taskfile_{{OS}}.yml
is not automatically included anymore.includes
, so you can manually include a Taskfile
based on operation system, for example..TASK
variable in templates with the task name (#252).method:
option. With this option, you can set a default method
to all tasks in a Taskfile (#246).timestamp
to checksum
(#246).status:
: .TIMESTAMP
which
contains the greatest modification date from the files listed in sources:
,
and .CHECKSUM
, which contains a checksum of all files listed in status:
.
This is useful for manual checking when using external, or even remote,
artifacts when using status:
(#216).--help
flag (#300, #330).context
errors when using the --watch
flag (#313, #317).--parallel
flag (alias -p
) to run tasks given by the command line in
parallel (#266).task
CLI only informing global vars would not
execute the default
task.silent: true
a the root of the
Taskfile.exit 0
was called (#251).method: checksum
will now re-run if generated files are deleted
(#228, #238).version:
.preconditions:
to task (#205).dir:
if it doesn't exist (#209, #211).--taskfile
flag (alias -t
), which can be used to run another
Taskfile (other than the default Taskfile.yml
) (#221).--summary
flag along with summary:
task attribute
(#180).:
(#161, #172).output
option (#173).vendor
directory in sync for some time, though;task --init
not being shown anymore (when a
Taskfile.yml
is not found)--watch
flag is given (#132)output
option. Please check out the
documentationtask --list
Version 2.0.0 is here, with a new Taskfile format.
Please, make sure to read the Taskfile versions document, since it describes in depth what changed for this version.
Taskfile.yml
instead of
Taskvars.yml
(#66)set
keyword;VAR: {sh: echo Hello}
instead of VAR: $echo Hello
--list
(or -l
) flag to print existing tasksTaskvars_windows.yml
, Taskvars_linux.yml
,
etc)-v
flag)--init
flag to create a new Taskfilegenerates
and sources
attributes (#26)cmd
is not used anymore on Windows. Always use Bash-like syntax for
your commands, even on Windows.context
and errgroup
packages (this will make other tasks to be
cancelled, if one returned an error)--force
or -f
flag to force execution of task even when it's up-to-date