Pete Davison
f22389a824
feat: implement task sorting with --sort
flag ( #1105 )
...
* refactor: move deepcopy into its own package
* feat: add generic orderedmap implementation
* refactor: implement tasks with orderedmap
* feat: implement sort flag for all task outputs
* refactor: implement vars with orderedmap
* chore: docs
* fix: linting issues
* fix: non deterministic behavior in tests
2023-04-06 12:07:57 +01:00
Pete Davison
719f30219b
refactor: use require for testing errors ( #1100 )
2023-04-06 11:18:41 +01:00
Mads Høgstedt Danquah
1b30c9dbca
Make status checks respect task and global silent mode ( #1107 )
2023-04-05 22:18:58 -03:00
Pete Davison
09c9094a6b
feat: enforce gofumpt linter
2023-04-05 21:55:42 -03:00
Pete Davison
738ffde962
fix: checksum variable in status is incorrect ( #1080 )
...
* fix: checksum variable in status is incorrect
* chore: changelog
2023-03-23 16:09:16 -05:00
Misite Bao
15ef1fa1c2
Make --init
generate .yml
instead of .yaml
( #1062 )
2023-03-16 21:53:01 -03:00
Dhanu Saputra
9c3ee234f1
Add splitArgs
template function ( #1059 )
2023-03-16 21:38:24 -03:00
Dennis Jekubczyk
88d644a7e9
Add ability to set error_only: true
on the group
output mode
2023-03-08 22:34:52 -03:00
Harel Wahnich
99ab2a4d62
for task up to date check both status and sources ( #1035 )
...
* remove redundant if statement
* add subtests to TestStatusChecksum
2023-03-05 22:16:41 -08:00
Pete Davison
d4ed7c3cfc
Merge pull request #1004 from go-task/semver
...
feat: use semver package for taskfile schema version
2023-03-02 19:07:52 +00:00
João Pedro
ec2110e58f
Add new TASK_VERSION special variable
...
Closes #1014
Closes #990
2023-02-22 22:08:38 -03:00
Pete Davison
8b72c86ba5
feat: use semver package for taskfile schema version
2023-02-10 18:14:38 +00:00
Pete Davison
1c1be683ab
feat: set and shopt directives ( #929 )
...
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2023-01-14 16:41:56 -03:00
Lea Anthony
aa6c7e4b94
Add support for 'platforms' in both task and command ( #980 )
2023-01-06 21:38:35 -03:00
Andrey Nering
d6d51a2f8b
Prevent TestFileWatcherInterval from running on CI
...
This test can fail intermittently. It's fine to run it only locally.
We were already doing this for TestSignalSentToProcessGroup.
2022-12-17 11:08:41 -03:00
Andrey Nering
957bff4b89
CHANGELOG + small improvements to #936
2022-12-17 10:35:30 -03:00
David Alpert
321f7b59d8
Add --json flag to be used by editor extensions ( #936 )
2022-12-17 10:31:00 -03:00
Pete Davison
b3627fcb18
Run Taskfiles from sub/child directories ( #920 )
2022-12-05 21:58:20 -03:00
Pete Davison
99d7338c29
feat: add task-level dotenv support ( #904 )
2022-12-05 21:25:16 -03:00
Pete Davison
f1d516cf2a
fix: interpolate includes taskfile and dir
2022-11-23 17:58:08 +00:00
Pete Davison
fa105a8a93
refactor: implement task list filtering
2022-11-02 14:42:59 +00:00
Pete Davison
5a08409a27
feat: run default task in included file when task is omitted
2022-11-02 14:27:15 +00:00
Andrey Nering
a4ec6e5257
Improve test #887
2022-10-14 19:50:43 -03:00
Andrey Nering
80b417c4ab
Merge pull request #887 from ronaudinho/fix/yaml-error-msg
...
Add file path to YAML error message
2022-10-14 19:36:58 -03:00
Andrey Nering
d2f2cba6d8
Merge branch 'master' into aliases
2022-10-14 18:44:56 -03:00
Andrey Nering
99014ad38d
Small adjustments + CHANGELOG for #865
2022-10-14 16:51:14 -03:00
Andrey Nering
403456d3dc
Merge pull request #865 from ilewin/configurable_watch_interval_#813
...
Configurable watch interval #813
2022-10-14 16:26:13 -03:00
Pete Davison
376a6182eb
feat: aliases
...
feat: add aliases to --list and --list-all flags
feat: add aliases to --summary
feat: enable aliases for included tasks
tests: added alias unit tests
2022-10-07 11:11:14 +00:00
ronaudinho
81de61d8db
Add file path to YAML error message
2022-10-07 10:18:53 +00:00
ilewin
c2f20465ab
Updated test for file watcher interval param
...
Updated Interval Setting Priority
2022-10-07 08:56:13 +02:00
Ivan Elfimov
b9d070f76b
Fix test related to task lables
2022-09-30 19:17:04 +04:00
ilewin
d8dc091267
Merge branch 'go-task:master' into configurable_watch_interval_#813
2022-09-19 20:22:26 +02:00
ilewin
1c44d8049a
Issue 813. Made watch interval configurable through global setting in Taskfile and through CLI arg.
...
Separated Taskfile param and Arg flag
2022-09-19 20:14:35 +02:00
Andrey Nering
4a5c1e9ec4
Merge branch 'internal-tasks' of https://github.com/pd93/task into pd93-internal-tasks
2022-09-17 12:59:19 -03:00
Andrey Nering
f45dd11e53
Add ROOT_DIR and TASKFILE_DIR special variables
...
Closes #215
2022-09-03 18:14:54 -03:00
Andrey Nering
beb927f7b4
Merge pull request #831 from ilewin/check_path_for_symlinks_issue_826
...
Attempt to fix Task not following symlinks
2022-08-23 18:38:17 -03:00
ilewin
cdc969cd4e
Added test to check if symlinks are evaluated for task source files
2022-08-23 18:36:19 +02:00
Oleg Kovalov
b08eac58e9
Fix go-critic suggestions
2022-08-17 19:37:58 +02:00
Pete Davison
3507fa40f1
feat: add internal to included files
2022-08-16 17:07:05 +00:00
Pete Davison
6f8f1f1409
feat(task): tasks can be internal (not accessible from cli)
2022-08-16 17:06:25 +00:00
Andrey Nering
c4e10ef0aa
Refactor: Add SmartJoin to handle IsAbs automatically
2022-08-06 18:19:07 -03:00
Bevan Arps
e396f4d06f
Resolve relative include paths relative to the including Taskfile
...
Closes #823
Closes #822
2022-08-03 21:59:17 -03:00
Andrey Nering
fedb68cde7
Allow override the .task
dir location with the TASK_TEMP_DIR
env
2022-07-08 14:40:10 -03:00
Bruno Delor
58c7cc5d05
Adds test TestErrorCode
2022-06-02 16:44:23 +02:00
Andrey Nering
9e1d4e7855
Add golangci-lint
...
https://golangci-lint.run/
2022-05-15 21:30:07 -03:00
Andrey Nering
a1f9b584dc
Remove unneeded log on test
2022-05-14 19:50:15 -03:00
Andrey Nering
41cd7acc87
Merge pull request #656 from tylermmorton/master
...
Add support for multi-level includes
2022-03-31 21:12:15 -03:00
Andrey Nering
de09843467
Improvements + CHANGELOG for #677
2022-03-19 18:41:03 -03:00
Dan Ballweg
2f18f7927d
test include variables
2022-02-24 13:17:20 -06:00
tylermmorton
1f1275255c
Fix bug in includes where default taskfiles were not being checked.
2022-02-21 15:31:55 -05:00
Andrey Nering
cfb665310e
Merge branch 'group-begin-message' of https://github.com/janslow/task into janslow-group-begin-message
2022-02-19 18:42:34 -03:00
Andrey Nering
51c6ebcd4d
Add tests, documentation and changelog for #666
2022-02-19 18:24:43 -03:00
tylermmorton
7cdf0000d9
Fix error message assertion in task_test
2022-02-03 22:23:01 -05:00
tylermmorton
02e7ff27c7
Add support for multi-level includes and cyclic include detection
2022-01-14 22:38:37 -05:00
Jay Anslow
74f5cf8f29
Add support for begin/end messages with grouped output
...
Fixes #647
This allows CI systems that support grouping (such as with [GitHub Actions's `::group::` command](https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#grouping-log-lines ) and [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash#formatting-commands )) to collapse all of the logs for a single task, to improve readability of logs
## Example
The following Taskfile
```
# Taskfile.yml
version: 3
output:
group:
begin: "::group::{{ .TASK }}"
end: "::endgroup::"
tasks:
default:
cmds:
- "echo 'Hello, World!'"
```
Results in the following output
```bash
$ task
task: [default] echo 'Hello, World!'
::group::default
Hello, World!
::endgroup::
```
See [this GitHub Actions job](https://github.com/janslow/task/runs/4811059609?check_suite_focus=true ) for a full example
<img width="771" alt="image" src="https://user-images.githubusercontent.com/1253367/149429832-6cb0c1b5-0758-442e-9375-c4daa65771bc.png ">
<img width="394" alt="image" src="https://user-images.githubusercontent.com/1253367/149429851-1d5d2ab5-9095-4795-9b57-f91750720d40.png ">
2022-01-14 00:22:14 +00:00
Andrey Nering
f945fa60d9
Merge branch 'bugfix/issue-481-dynamic-vars-broken' of https://github.com/masaushi/task into masaushi-bugfix/issue-481-dynamic-vars-broken
2022-01-04 17:39:14 -03:00
Andrey Nering
7e0346d6eb
Add CHANGELOG, documentation and small improvements to #401
2022-01-04 17:16:21 -03:00
Andrey Nering
00a90d1fe6
Merge branch 'f/list-all' of https://github.com/therealkevinard/task into therealkevinard-f/list-all
2022-01-04 17:03:12 -03:00
Kevin Ard
42702e81b3
refactor: wrap PrintTasksHelp with arg-less signatures
...
provide exported methods for accessing PrintTasksHelp variants.
2022-01-03 12:12:18 -05:00
Jacob McCollum
09c9d55695
Changes from PR Review:
...
- Remove ^task syntax from `defer`
- Support task call syntax in defer
2022-01-02 16:38:06 -05:00
Jacob McCollum
69e9effc88
initial pass at deferred commands
2022-01-02 15:55:43 -05:00
Margus Kerma
1d7982e80a
fix( #584 ): Add support to yaml extension
...
- init creates Taskfile.yaml
- add changelog entry
- add zsh completion support for Taskfile.yaml
2022-01-02 15:23:10 +02:00
masaushi
93dcb20e12
fix error in evaluating dynamic variables with newly created directory
2021-09-26 22:30:32 +09:00
Andrey Nering
a5ed8ad58c
Merge pull request #573 from masaushi/bugfix/issue-534-seg-fault-on-empty-command
...
Fix segmentation fault on nil slice element for issue #534
2021-09-25 09:46:47 -03:00
masaushi
1de4b38766
fix segmentation fault on nil slice element
2021-09-15 00:01:33 +09:00
Sally Young
8f80fc4e2c
Issue #519 : Allow includes to be optional
2021-08-11 17:28:44 +01:00
Ross Hammermeister
97c85e39c3
Only run task once for #53
2021-07-31 19:36:40 -03:00
Andrey Nering
a7594740e3
Merge pull request #477 from mrngsht/sources_evaluation
...
Evaluate sources also if status is up-to-date
2021-07-10 21:54:47 -03:00
Nicolas Fouché
08265ed1d7
Allow vars in dotenv paths, including environment variables
...
Closes #453
Closes #434
Ref #433
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2021-06-05 16:00:19 -03:00
Andrey Nering
4e1f2ad017
Enforce NO_COLOR=1 on tests to make sure it passes
...
Closes #459
Fixes #480
Ref #343
Ref fatih/color#137
2021-05-30 22:48:48 -03:00
mrngsht
58c69e36a1
Evaluate sources also if status is up-to-date
2021-04-21 21:56:25 +09:00
George Pollard
fe917affd2
Include task name in log output
2021-04-04 16:16:22 -03:00
Ross Hammermeister
c6ecf70377
Adding a --concurrency (-C) flag
2021-03-07 09:49:57 -03:00
Andrey Nering
e086b654aa
Environment from .env file should be available as variables
...
Fixes #379
2021-01-12 11:11:40 -03:00
Andrey Nering
4afc0e8ed0
Fixed some bugs and regressions regarding dynamic variables and directories
...
Closes #426
2021-01-09 13:51:06 -03:00
Andrey Nering
83d25bfa00
Refactor: Fix import order
...
It should be: stdlib > libs > app
2021-01-07 11:48:33 -03:00
Andrey Nering
59d2733b88
Make dynamic variables run on the right directory
...
It was always running in the main Taskfile dir, even when the variable was
declared in an included taskfile in another directory or when task had a
custom dir.
Closes #384
2021-01-07 11:26:11 -03:00
Andrey Nering
ac8e344173
Run "set -e" automatically for every command
...
Without this, multiline command strings won't always exit when they fail.
Closes #403
2020-12-27 17:15:12 -03:00
Kevin Ard
347c796662
add tests to previous
2020-11-13 16:24:34 -05:00
Andrey Nering
582a66bb2f
Merge pull request #385 from chris-garrett/dev/378-missing-env
...
Resolves #378 - allow for missing env files as they may be bootstrapped.
2020-10-12 21:12:08 -03:00
Andrey Nering
d78f78bb5c
Fix panic for empty tasks
...
Closes #338
Closes #362
Co-authored-by: Bharath Kumar <shettybharath4@gmail.com>
2020-10-12 21:03:13 -03:00
Chris Garrett
c6138a0660
#378 - allow for missing env files as they may be bootstrapped.
2020-10-03 16:39:58 -06:00
Damian Szulc
47dd9b5a03
Move args and taskfile packages to root directory
2020-08-19 10:59:58 +02:00
Andrey Nering
fb72b46a3c
github.com/go-task/task/v2 -> github.com/go-task/task/v3
2020-08-16 15:48:19 -03:00
Chris Garrett
8b962fb8e8
#324 implement dotenv
2020-08-03 16:18:38 -06:00
Adam Wasila
4bc183a8a1
Add basic unit tests for label attribute
2020-06-14 15:12:48 +02:00
Andrey Nering
9f0f18c5c4
v3: Allow interpolation on "includes"
...
The idea is to allow manual inclusion of a OS-dependant Taskfile, since it's
not automatically included anymore.
2020-05-17 16:03:03 -03:00
Andrey Nering
68ce8642b1
Create v3 compiler which respects declaration order of variables
...
Also, fix "<no value>" been printed when a non-existing variable is printed.
2020-05-16 15:46:07 -03:00
Evgeny Abramovich
17ad7060b3
Added version validation and updated tests
2020-02-15 17:24:06 +03:00
Evgeny Abramovich
f38ba7fcd3
Removed automatic inclusion of Taskfiles by OS and update tests
2020-02-15 17:19:09 +03:00
Evgeny Abramovich
d567e23e50
Added tests for new inport taskfile logic
2020-01-29 11:25:11 +03:00
Andrey Nering
b7b752b92f
Allow shorter syntax for tasks with default configuration
...
Closes #194
Closes #240
Co-authored-by: Jaedle <dennis.jekubczyk@gmail.com>
2019-12-07 21:28:02 -03:00
Andrey Nering
7373639f57
Expose .TASK
variable with the task name
...
Closes #252
2019-12-07 19:43:10 -03:00
Andrey Nering
14d7f04a81
Always expode .TIMESTAMP and .STATUS when using status:
2019-09-14 18:04:41 -03:00
Andrey Nering
1a28e5e0d4
Few code improvements on #216
2019-09-14 17:54:41 -03:00
Andrey Nering
884cd0d636
Merge branch 'CypherpunkArmory-report-timestamp-to-status' into v3
2019-09-14 17:18:42 -03:00
Andrey Nering
78595fba0b
Make "checksum" the default method in v3
2019-09-08 22:51:56 -03:00
Andrey Nering
d6a49da870
Merge branch 'master' into v3
2019-09-08 22:12:02 -03:00
Andrey Nering
84da80356d
Use stdlib instead of go-homedir
2019-09-08 22:07:48 -03:00
Andrey Nering
0e1d8a72e6
Revert "Ensure the $HOME env is being set on Windows"
...
This reverts commit 52028fc3bc
.
2019-09-08 21:56:23 -03:00