1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00
Commit Graph

165 Commits

Author SHA1 Message Date
39706105e1 fix: CLI_ARGS is a string and not an array (#2191) 2025-04-21 16:31:18 -03:00
3976e8372a chore: move the experiments package out of the internal/ dir
Closes #2014
2025-04-21 13:55:56 -03:00
c5afffb551 feat: recursive config search (#2166)
* refactor: experiments flags

* refactor: args.Parse

* feat: recursive search for taskrc files

* feat: consolidate some code into new fsext package

* feat: add tests for search and default dir

* fix: linting issues
2025-04-19 12:20:33 +01:00
a84f09d45f feat: remote taskfile improvements (cache/expiry) (#2176)
* feat: cache as node, RemoteNode and cache-first approach

* feat: cache expiry

* feat: pass ctx into reader methods instead of timeout

* docs: updated remote taskfiles experiment doc

* feat: use cache if download fails
2025-04-19 12:12:08 +01:00
38b42d0fb1 fix: experiments validation should happen before command flags are evaluated 2025-04-10 08:45:55 +00:00
55790be6ad feat: better versioning (#2131) 2025-04-05 23:09:27 +01:00
2a92b70bc2 feat: better functional options (#2147) 2025-03-31 21:49:00 +01:00
ffeb3bcc3f refactor: executor functional options (#2085)
* refactor: executor functional options

* refactor: minor tidy up of list code

* fix: WithVersionCheck missing from call to NewExecutor

* feat: docstrings for structs with functional options

* refactor: prefix the functional options with the name of the struct they belong to
2025-03-10 20:38:25 +00:00
60c8ee0ce6 refactor: ast.Call should be in main task package (#2084) 2025-02-23 18:30:42 +00:00
daf39a04bf feat: iterators (#1798)
* feat: update to github.com/elliotchance/orderedmap/v3

* refactor: better sort package

* feat: iterators

* chore: remove unnecessary code
2025-02-22 16:22:03 +00:00
ff8c913ce7 chore: changelog and minor adjustments for #2018 2025-02-10 11:24:32 +00:00
0e23404d23 feat: specify --init filename/path (#2018)
* feat: specify init filename with --taskfile flag

previously, it was not possible to specify which filename to use when initializing a new Taskfile as it was hardcoded as "Taskfile.yml".

now the --taskfile flag specifies where to write the file to, and the first * contained in it will be replaced by "Taskfile", so `task -it *.yaml` will create a `Taskfile.yaml` file.

* docs: update CLI reference

* fix Flags header being inside tip admonition
* change -t flag's default column and add a description
* add Default Filenames section

* docs: revert adding Default Filenames section

I didn't realize it already existed elsewhere.

* refactor: use path instead of filepath on InitTaskFile

as requested to prevent ambiguity with the stdlib package.

* fix TestInit (incorrectly merged)

* docs: remove outdated info on --taskfile flag

* refactor task initialization changes

- remove const DefaultTaskInitFilename from taskfile/taskfile.go
- revert description of Entrypoint flag
- make InitTaskfile accept a path to either a file or a directory, and join the default Taskfile name+ext to it if it is a directory
- take the target file path from the first argument instead of the Entrypoint flag
- detect extension-only filenames (".yaml") instead of replacing "*" with "Taskfile"
- use different format in success log so that it makes sense at different paths than the current dir

* print colon instead of "at"

it's a lot cleaner in most cases.

* rewrite init tests

test both initializing to a directory path and a file path

* return final path from InitTaskfile

...and print it's relative representation

* fix lint error (ineffassign)

* use filepathext.TryAbsToRel() instead

* define and use filepathext.IsExtOnly()

* link to default filenames list in cli ref docs

(specifically in the --taskfile flag description)
2025-02-10 11:22:49 +00:00
6ce798e16c feat: experiments logging improvements (#2049)
* feat: warn when enabling inactive experiments

* feat: TASK_ environment prefix

* feat: calculate experiment enabled/active instead of storing

* refactor: rename GetTaskVar to GetTaskEnv

* feat: experiments tests
2025-02-08 23:02:51 +00:00
88c4ba1740 feat: make Taskfile initialization less verbose by default (#2011)
* change what is printed when creating Taskfile

When using --init to create a new Taskfile, it used to print the whole contents of the file to the terminal, which was unnecessarily verbose (and honestly felt unintentional).

Now only the filename is printed by default and the --silent and --verbose flags can be used to control the behavior (print nothing or content + filename, respectively).

* include additional new line with -i -v

it looks slightly better in the terminal.

* print init success text in green

* fix TestInit, create and pass in a logger

* move logging outside of InitTaskfile

- revert API changes made to InitTaskfile
- make consts in init.go public so they can be accessed from task.go
- rename variable "logger" to "log" in task.go to fix conflict with logger package

* move TestInit into init_test.go file

as requested by pd93.
2025-01-29 22:41:17 +00:00
69f5714e45 fix: disable version check for use as an external library
Closes #1938
2025-01-18 10:26:58 -03:00
bc844246d4 chore: allow using only github.com/go-task/task/v3/errors package (#1926) 2024-11-30 12:00:58 -03:00
390220ec9c fix: typos in docs, changelog, testdata, comments (#1910) 2024-11-07 13:25:59 -03:00
ddccd1bb61 feat: add TASK_OFFLINE env and expose it as a special variable (#1716)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2024-09-21 11:17:15 -04:00
3747b2ab7f feat: completion command (#1157) 2024-09-02 19:21:53 +00:00
76030c9146 feat(remote): add a command to clear the cache (#1639)
* feat(remote): add a command to clear the cache

* Update cmd/task/task.go

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* rebase

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2024-06-28 17:42:16 +01:00
413dcd28a8 Add verbose/silent variables (#1669) 2024-06-28 17:13:52 +01:00
1e25ceab29 fix: version check (#1663)
* fix: version check

* refactor following review
2024-05-20 21:48:05 +01:00
8d138a5eea feat: better yaml parsing and error handling (#1619) 2024-05-16 01:24:02 +00:00
f35e51e4e5 feat: better release task 2024-05-15 21:32:33 -03:00
ddd9964db7 feat: warn about move from any variables to map variables (#1618) 2024-04-24 21:40:52 +01:00
e9448bd4be fix: advanced import operates on including file instead of included file 2024-04-09 12:37:18 +01:00
43d84560e5 v3.36.0 2024-04-08 22:12:11 -03:00
cbc19d35ea feat: root remote taskfiles 2024-03-25 19:13:27 +00:00
97cf02872f fix: update references to website directory 2024-03-21 01:04:07 +00:00
41b45e6dc4 feat: update release tool to update latest doc version 2024-03-21 01:04:07 +00:00
d30539c17e refactor: move flags into their own package (#1521)
* feat: move flags to their own package

* refactor: move flag validation into flags package
2024-02-29 00:12:19 +00:00
6c21568447 fix: list tasks (#1520) 2024-02-28 19:44:34 -03:00
1ef5cf71d0 feat: pass ast.Call by reference 2024-02-22 14:58:24 -06:00
07a0b8938f refactor: bubble errors from ListTaskNames 2024-02-21 21:06:34 -03:00
dfe39bfb5d feat: support multiple experiment values 2024-01-11 14:44:04 +00:00
42af0fc791 feat: invert call.Direct (#1459) 2024-01-10 21:32:49 -03:00
247c2586c2 refactor: taskfile/ast package (#1450)
* refactor: ast package

* feat: read -> taskfile

* refactor: taskfile.Taskfile -> taskfile.Read

* refactor: move merge function back into taskfile package

* refactor: rename taskfile.go to read.go
2023-12-29 20:32:03 +00:00
2b67d05b9d feat: remove v2 support (#1447)
* feat: remove v2 support

* docs: update v2 schema docs
2023-12-29 20:26:02 +00:00
58275b4b33 v3.33.1 2023-12-21 20:10:41 -03:00
e177f48e41 feat: CLI_FORCE special variable (#1434) 2023-12-21 02:08:57 +00:00
7c93741670 feat: docusaurus v3 (#1432)
* feat: docusaurus v3

* feat: update release tool to stop it from converting links - this is now done use mdx plugins

* fix: broken links

* feat: more github links and prettier config

* chore: changelog

* fix: blog emoji
2023-12-21 01:59:29 +00:00
de09e675c1 refactor: rename Var.Static to Var.Value 2023-12-20 19:55:25 -06:00
546a4d7e46 feat: prefer remote taskfiles over cached ones (#1345)
* feat: prefer remote taskfiles over cached ones

* feat: implemented cache on network timeout

* feat: --download always downloads, but never executes tasks

* feat: --timeout flag

* fix: bug with timeout error handling

* chore: changelog
2023-11-17 14:51:10 -06:00
8355f16809 feat: add --no-status flag (#1368)
disables status check when running with `--list` `--json` options
2023-11-15 22:31:02 -03:00
42ac242927 release: v3.30.0 2023-09-13 22:04:01 -03:00
22ce67c5e5 feat: remote taskfiles (HTTP) (#1152)
* feat: remote taskfiles over http

* feat: allow insecure connections when --insecure flag is provided

* feat: better error handling for fetch errors

* fix: ensure cache directory always exists

* fix: setup logger before everything else

* feat: put remote taskfiles behind an experiment

* feat: --download and --offline flags for remote taskfiles

* feat: node.Read accepts a context

* feat: experiment docs

* chore: changelog

* chore: remove unused optional param from Node interface

* chore: tidy up and generalise NewNode function

* fix: use sha256 in remote checksum

* feat: --download by itself will not run a task

* feat: custom error if remote taskfiles experiment is not enabled

* refactor: BaseNode functional options and simplified FileNode

* fix: use hex encoding for checksum instead of b64
2023-09-12 22:42:54 +01:00
d1f643ebd9 fix: --status flag should not have side-effects (#1313)
Closes #1305
Closes #1307

Co-authored-by: Giovanni Visciano <giovanni_visciano@yahoo.it>
2023-08-26 21:30:23 +00:00
46f7bba90d feat: experiments flag (#1242) 2023-06-30 01:29:28 +00:00
5fdaa9aa36 feat: implement gentle force experiment draft (#1216)
* feat: implement gentle force experiment draft

* docs: changelog
2023-06-18 02:32:18 +01:00
5e78171d3e feat: support lowercase Taskfiles (#1221) 2023-06-17 14:38:53 -03:00