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
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
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
Andrey Nering
1c782c599f
Remove deprecated "$" and "^" prefixes
...
`$` was a variable prefix that make it being evaluated as shell. It was
replaced with `sh:`.
`^` is a command prefix that make it run another task. It was replaced
with `task:`.
These were added long ago when we were experimenting with stuff and kept for
some time for backward compatibility reasons, but sometimes causes confusion
and I think the time to remove the code came.
Closes #644
Closes #645
Ref #642
Co-authored-by: Trite <60318513+Trite8Q1@users.noreply.github.com>
2022-01-02 15:26:42 -03: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
3e16ca37bc
Updating version checking
2021-07-31 19:36:40 -03: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
mrngsht
58c69e36a1
Evaluate sources also if status is up-to-date
2021-04-21 21:56:25 +09: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
299e27af15
Fix build
2021-01-07 11:39:36 -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
Chris Garrett
8b962fb8e8
#324 implement dotenv
2020-08-03 16:18:38 -06:00
Andrey Nering
572f6a7fab
CHANGELOG, docs and nits for #321 and #337
2020-06-14 17:12:20 -03: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
1a33f9168b
Merge branch 'report-timestamp-to-status' of https://github.com/CypherpunkArmory/task into CypherpunkArmory-report-timestamp-to-status
2019-09-01 21:44:23 -03:00
Stephen Prater
a1aec8178a
Export Time Struct to Template
2019-08-25 13:36:48 -07:00
Stephen Prater
1ee684b7c0
Expose timestamp and checksum to status
2019-08-25 09:39:39 -07:00
jaedle
0f385f9f4e
remove v1
2019-08-18 17:37:21 +02:00
Andrey Nering
4cee4aa5a8
Fix typo
2019-06-15 21:58:37 -03:00
Andrey Nering
0608782cfa
Merge pull request #205 from CypherpunkArmory/add-precondition-to-task
...
Add Preconditions to Tasks
2019-06-15 21:55:20 -03:00
Andrey Nering
fe2b8c8afa
Post-fixes to #211
2019-06-15 21:12:54 -03:00
Stephen Prater
cc9264854e
Change error output
2019-06-11 12:20:56 -07:00
Marco Molteni
c663c5c507
When "dir:" attribute points to a non-existing dir, create it
...
Closes #209
2019-06-04 18:58:22 +02:00
Marco Molteni
1e93c38307
Task directory: test when "dir:" attribute points to an existing dir
2019-06-04 18:36:35 +02:00
Marco Molteni
81baf808c9
Task directory: test default case (no "dir:" attribute)
2019-06-04 18:24:01 +02:00
Stephen Prater
044d3a0ff9
Remove ignore_errors
2019-05-28 13:02:59 -07:00
Stephen Prater
bd5882f0f0
Add Preconditions to Tasks
2019-05-17 13:51:15 -07:00
jaedle
b7564080bc
add space between tasks
2019-03-04 12:48:26 +01:00
jaedle
23c4adcef6
add spacing for tasks
2019-03-04 12:15:40 +01:00
jaedle
808542bed0
remove unnecassry test for multiple summaries
2019-03-04 12:13:13 +01:00
Andrey Nering
5bca3cfd71
Update testdata/summary/Taskfile.yml
...
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
2019-03-03 19:44:27 +01:00
Andrey Nering
26ce4e6886
Update testdata/summary/Taskfile.yml
...
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
2019-03-03 19:44:14 +01:00
jaedle
3ca590b185
display summary for tasks without summary/description
2019-02-24 19:02:44 +01:00
jaedle
765e3dbf72
print only commands if present
2019-02-24 16:15:59 +01:00
jaedle
80f5cee599
refactoring
2019-02-24 16:10:43 +01:00
jaedle
4dcb124693
print commands on summary only if commands are present
2019-02-24 16:08:32 +01:00
jaedle
31ecf167cc
rename to summary in test fixtures
2019-02-24 15:54:11 +01:00
jaedle
d05d418c4c
renaming field in taskfile to summary
2019-02-24 15:37:02 +01:00
jaedle
fdbc130d8d
do not show empty dependencies
2019-02-24 14:55:04 +01:00
jaedle
4b3cea3812
display dependend tasks
2019-02-24 14:53:39 +01:00
jaedle
1c3082ffa6
rename test fixture
2019-02-24 14:48:48 +01:00
jaedle
0446cfdba0
display commands of task
2019-02-24 14:37:14 +01:00
jaedle
db1d3183b6
refatoring
2019-02-24 14:32:47 +01:00
jaedle
fb666394fc
refatoring
2019-02-24 14:31:29 +01:00
jaedle
1054c89a9d
add missing test fixture file
2019-02-24 14:24:55 +01:00
jaedle
1ac6f17e6a
should not surpress empty lines expect on last line
2019-02-24 11:58:44 +01:00
jaedle
80d88d9789
refactoring
2019-02-24 11:22:14 +01:00
jaedle
4b64fcb8a4
add more tests
2019-02-24 11:09:55 +01:00
jaedle
a951f2403d
add more tests for details
2019-02-24 11:01:48 +01:00
jaedle
f9adeba7f1
add basic test for details
2019-02-24 09:53:49 +01:00
Andrey Nering
f8a6c5d06c
Fix execext.Expand for file names with spaces
...
Fixes #176
2019-02-21 20:59:17 -03:00
Andrey Nering
902f0d3ac4
Don't persist new checksum on the disk if dry mode is enabled
...
Fixes #166
2019-02-09 10:44:35 -02:00
Andrey Nering
1dec956e99
Allow calling a task of the root Taskfile from within an included Taskfile
...
Fixes #161
2019-02-02 21:22:08 -02:00
Andrey Nering
aac6c5a1c7
Add hability to globally set environment variables
...
Closes #138
2019-01-02 12:06:12 -02:00
Andrey Nering
95b75c5330
Fix issue on running dependencies or tasks on included Taskfiles
...
Fixes #151
2018-12-09 15:54:58 -02:00
Andrey Nering
a9b1f38a7c
Fix nil errors when merging Taskfiles
...
Closes #150
2018-12-02 14:17:32 -02:00
Andrey Nering
5eb1a1f7f5
Fixes to Taskfile including:
...
- Disallow recursive Taskfile including (i.e. included Taskfile including other Taskfiles)
- Write test for included a file instead of a directory
2018-10-13 17:52:09 -03:00
Andrey Nering
5a28560177
Write first test for including a Taskfile
2018-10-13 16:56:51 -03:00
Andrey Nering
687b4ec837
Fix error when using checksum method and no file exists for a source glob
...
Closes #131
2018-09-01 11:23:38 -03:00
Andrey Nering
feaf70922d
Allow ignore_error at task level
2018-08-05 12:53:42 -03:00
Andrey Nering
550c116aea
Merge branch 'master' into master
2018-08-05 11:32:07 -03:00
Andrey Nering
a5f31a4280
Dry run small code style changes
2018-08-05 11:28:02 -03:00
Tobias Salzmann
90a5f17f58
Merge branch 'master' into master
2018-08-01 10:47:25 +02:00
Tobias Salzmann
108cb91d95
IgnoreError
...
* Document ignore_error
* ignore_error only for commands
2018-08-01 10:44:53 +02:00
Josh Bebbington
00a0755ff3
Added test for executor.DryRun
2018-07-31 23:17:21 +01:00
Andrey Nering
67105b332f
Move path expanding logic to shell.Expand
2018-07-15 15:49:00 -03:00
Tobias Salzmann
05600601ff
add ignoreError option
2018-07-10 10:44:58 +02:00
Andrey Nering
4f368923a5
Upgrade own Taskfile to version 2
2018-03-04 16:20:26 -03:00
Andrey Nering
1a3df08aca
Allow global variables in the Taskfile
...
Closes #66
2018-03-04 15:39:14 -03:00
Andrey Nering
2d4ca37226
Use semver for Taskfile versions
2018-03-03 18:54:42 -03:00
Andrey Nering
3556942516
Improve nested variables support
...
Closes #76 #89 #77 #83
2018-02-18 09:50:39 -03:00
Andrey Nering
134c6b79c4
Add Taskfile struct and start implementing new format
...
Updates #54 , #66 and #77
2017-12-29 18:46:15 -02:00
Andrey Nering
48bf09da21
remove deprecated set
keyword
2017-09-17 11:24:30 -03:00