mirror of
https://github.com/go-task/task.git
synced 2026-05-18 13:15:41 +02:00
Compare commits
1009 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae3884386d | ||
|
|
6cc8d602fc | ||
|
|
e2c1b3b931 | ||
|
|
59e99caf8a | ||
|
|
127b685104 | ||
|
|
5af361ab1c | ||
|
|
06727c3892 | ||
|
|
a452f0b4bd | ||
|
|
9ee714d048 | ||
|
|
76eb49c355 | ||
|
|
91878fccaf | ||
|
|
44aaec86a1 | ||
|
|
f815ce2901 | ||
|
|
105756eb27 | ||
|
|
7a2f8d691c | ||
|
|
75659485ee | ||
|
|
18cb66f8c7 | ||
|
|
45c3592818 | ||
|
|
2789801668 | ||
|
|
e09f42791a | ||
|
|
8d19ad306e | ||
|
|
793c1e5587 | ||
|
|
1a86c2c52d | ||
|
|
15cbe131fb | ||
|
|
082cdcc358 | ||
|
|
1936142042 | ||
|
|
8e4afa88f7 | ||
|
|
794de91d05 | ||
|
|
16bd9bc61e | ||
|
|
c0d3584626 | ||
|
|
e0d3e33c32 | ||
|
|
e37c109f0c | ||
|
|
efd8bab615 | ||
|
|
603463926e | ||
|
|
31bbb47162 | ||
|
|
62b52911fa | ||
|
|
ac96612a17 | ||
|
|
3913701f7f | ||
|
|
dcf66e7380 | ||
|
|
188034650b | ||
|
|
e01b5565a2 | ||
|
|
8bc98fedbf | ||
|
|
9a406f5998 | ||
|
|
f0e9751f7e | ||
|
|
0aa6c5eae8 | ||
|
|
785fc4ac3c | ||
|
|
3eab444c03 | ||
|
|
b28aff04a7 | ||
|
|
81fd454ef4 | ||
|
|
65c923e07a | ||
|
|
45dd77ad6d | ||
|
|
51c2a104b2 | ||
|
|
59ffb0a4c4 | ||
|
|
38341fffbd | ||
|
|
6633e65ee6 | ||
|
|
745de72d7e | ||
|
|
af95e5b3e0 | ||
|
|
270ca697b2 | ||
|
|
02ac79e577 | ||
|
|
031558afe4 | ||
|
|
eaf252f46d | ||
|
|
bf043f411b | ||
|
|
7ec5cac56b | ||
|
|
50d6e057d5 | ||
|
|
8adb9f4ece | ||
|
|
c145658206 | ||
|
|
8cfac5a25a | ||
|
|
1e8fc5011b | ||
|
|
42dfc778f8 | ||
|
|
90b11dd02e | ||
|
|
44b5b1b6ed | ||
|
|
c2523796c0 | ||
|
|
125f34ef47 | ||
|
|
5a361f7845 | ||
|
|
52e0b59548 | ||
|
|
b42299a5aa | ||
|
|
f9c77acd96 | ||
|
|
9ec544817f | ||
|
|
606a8f9db5 | ||
|
|
6995cd71d9 | ||
|
|
d9165646c6 | ||
|
|
720137304b | ||
|
|
8026d8ddb3 | ||
|
|
7876ccb3bc | ||
|
|
f22389a824 | ||
|
|
719f30219b | ||
|
|
cfa409b5e7 | ||
|
|
1b30c9dbca | ||
|
|
09c9094a6b | ||
|
|
aab51c331f | ||
|
|
a6d57496c2 | ||
|
|
f285d5dbf7 | ||
|
|
79fde26f4f | ||
|
|
a729ee6fca | ||
|
|
451a3773c3 | ||
|
|
38ade8fbc9 | ||
|
|
c229570bd9 | ||
|
|
ce14f10297 | ||
|
|
5430c49833 | ||
|
|
510b977cea | ||
|
|
7a966d8c1b | ||
|
|
bdf7fb0858 | ||
|
|
a80da8b65c | ||
|
|
22983bcdd3 | ||
|
|
4d4acc72f0 | ||
|
|
d7d8d3411c | ||
|
|
006097bee2 | ||
|
|
4b23d63d39 | ||
|
|
d8053f64ef | ||
|
|
4cbdcb2659 | ||
|
|
5583cea936 | ||
|
|
cc1fd3d03e | ||
|
|
d72eb009e4 | ||
|
|
738ffde962 | ||
|
|
34f15a4976 | ||
|
|
c807c7bd39 | ||
|
|
1081231b7c | ||
|
|
fc50b846c4 | ||
|
|
eead5f44fc | ||
|
|
fc0280a6ab | ||
|
|
65f5222a2a | ||
|
|
54b5d4d389 | ||
|
|
ee36c8ba9c | ||
|
|
e40d2eec9e | ||
|
|
15ef1fa1c2 | ||
|
|
291ee123c9 | ||
|
|
1b7009f4d5 | ||
|
|
9c3ee234f1 | ||
|
|
e0fcb040ee | ||
|
|
fc2b0e0fee | ||
|
|
44bc0971ad | ||
|
|
8717c4c287 | ||
|
|
cf542f6fdf | ||
|
|
94e4a2431b | ||
|
|
3eb4c9eae8 | ||
|
|
5ecabc5fe2 | ||
|
|
0838d48ee3 | ||
|
|
c64f8818be | ||
|
|
97ffd84d0e | ||
|
|
f2114f09f7 | ||
|
|
9c844850e4 | ||
|
|
68aef2ef0d | ||
|
|
88d644a7e9 | ||
|
|
4b97d4f7f5 | ||
|
|
bc14c633ae | ||
|
|
a29e5d39ca | ||
|
|
f1506ee500 | ||
|
|
6e346de9fb | ||
|
|
99ab2a4d62 | ||
|
|
d4ed7c3cfc | ||
|
|
bc0554575a | ||
|
|
1f4906244b | ||
|
|
52756ab83e | ||
|
|
97dcbe6932 | ||
|
|
e35bf22dd3 | ||
|
|
a36b1b9cec | ||
|
|
1920ee38c3 | ||
|
|
ec2110e58f | ||
|
|
12a1cd6f62 | ||
|
|
9af056e746 | ||
|
|
c8fe450623 | ||
|
|
ab1fe742f3 | ||
|
|
8b72c86ba5 | ||
|
|
28c5f4a635 | ||
|
|
74f69a21cd | ||
|
|
e23dacd6d4 | ||
|
|
58d582941b | ||
|
|
3bbc51949c | ||
|
|
69e0254a99 | ||
|
|
1091a914bd | ||
|
|
ecc65a218e | ||
|
|
426ed7eff6 | ||
|
|
73aba36309 | ||
|
|
cb393ccd3a | ||
|
|
347fcf9f67 | ||
|
|
fce7575b03 | ||
|
|
2da7ddc399 | ||
|
|
1c1be683ab | ||
|
|
4be1050234 | ||
|
|
2efb3533ec | ||
|
|
aa6c7e4b94 | ||
|
|
63c50d13ee | ||
|
|
c1e127e42f | ||
|
|
9e38e8a4db | ||
|
|
b4c95d6b0b | ||
|
|
c4766e2611 | ||
|
|
796097e3ab | ||
|
|
c7d9efebf9 | ||
|
|
8f4306d321 | ||
|
|
435f086cb7 | ||
|
|
01c9158120 | ||
|
|
e235d77d64 | ||
|
|
dbe8131b75 | ||
|
|
0a9d76515e | ||
|
|
0ce1af9ee0 | ||
|
|
c4452d2698 | ||
|
|
491888f6c0 | ||
|
|
e4158dc5e4 | ||
|
|
0307ca8ac6 | ||
|
|
156a273351 | ||
|
|
d6d51a2f8b | ||
|
|
a98b41d657 | ||
|
|
87ec78fbaa | ||
|
|
957bff4b89 | ||
|
|
321f7b59d8 | ||
|
|
41a9316523 | ||
|
|
1072ff5950 | ||
|
|
983f6fff5d | ||
|
|
b3627fcb18 | ||
|
|
99d7338c29 | ||
|
|
9cf930454d | ||
|
|
4b4962e8c6 | ||
|
|
f2afa77114 | ||
|
|
3aa647c89b | ||
|
|
45ab4dc718 | ||
|
|
d1850e8fd2 | ||
|
|
f1d516cf2a | ||
|
|
d55282b53c | ||
|
|
ef9f7af0c5 | ||
|
|
8823887bb4 | ||
|
|
593980e45a | ||
|
|
081dc16312 | ||
|
|
35599af04b | ||
|
|
a74b35379e | ||
|
|
7d16c9f68d | ||
|
|
890759cc5f | ||
|
|
e710e2cc5d | ||
|
|
d787faece4 | ||
|
|
9702109ea9 | ||
|
|
e547829505 | ||
|
|
a664a26062 | ||
|
|
fa105a8a93 | ||
|
|
3a0c7a8c36 | ||
|
|
13f4b376e8 | ||
|
|
5a08409a27 | ||
|
|
9bbdac3c2e | ||
|
|
a990ffe53d | ||
|
|
3a4b347d50 | ||
|
|
b80e1e4a43 | ||
|
|
fd71dfda6a | ||
|
|
fdbcbd395d | ||
|
|
dba964b559 | ||
|
|
8e0816a09d | ||
|
|
405b79f86c | ||
|
|
620e6955e5 | ||
|
|
a4997dd54d | ||
|
|
3efa9ac8c3 | ||
|
|
fdd52d74e9 | ||
|
|
ac81dea3ec | ||
|
|
549c37ef87 | ||
|
|
6a369ee31c | ||
|
|
2e573d37ae | ||
|
|
394afe2633 | ||
|
|
99ed3001f0 | ||
|
|
9e4cab2af9 | ||
|
|
33b6927b79 | ||
|
|
852a176e1f | ||
|
|
7511249514 | ||
|
|
3429cdd8af | ||
|
|
a1cd8eafd8 | ||
|
|
fbfb4ba9c4 | ||
|
|
ba9ba63792 | ||
|
|
460b89ce51 | ||
|
|
a4ec6e5257 | ||
|
|
44aa2ee3b3 | ||
|
|
80b417c4ab | ||
|
|
6d90c781c9 | ||
|
|
c51f04eca8 | ||
|
|
dda2004753 | ||
|
|
297f9eccea | ||
|
|
d2f2cba6d8 | ||
|
|
172d71435a | ||
|
|
bb1aec8a7e | ||
|
|
476d9f5e70 | ||
|
|
99014ad38d | ||
|
|
403456d3dc | ||
|
|
6335878317 | ||
|
|
6bff658af0 | ||
|
|
b111e7bd12 | ||
|
|
3e5ee2332a | ||
|
|
66f6998c86 | ||
|
|
f2a8f8ad8f | ||
|
|
540f6ecfdb | ||
|
|
8ec89f1bbd | ||
|
|
d33906b6e4 | ||
|
|
bb79fa1dc3 | ||
|
|
376a6182eb | ||
|
|
81de61d8db | ||
|
|
d2061ec898 | ||
|
|
077efbd2e7 | ||
|
|
8ce1782380 | ||
|
|
c2f20465ab | ||
|
|
fb0e43989d | ||
|
|
754248395c | ||
|
|
6e975ca155 | ||
|
|
79a2bc404e | ||
|
|
42a26e1741 | ||
|
|
695711e124 | ||
|
|
0d5811e502 | ||
|
|
b9d070f76b | ||
|
|
122c3f083e | ||
|
|
5d22cf4327 | ||
|
|
219d3ad193 | ||
|
|
e72157e26a | ||
|
|
50a377a7c4 | ||
|
|
9d7ddff60c | ||
|
|
081d878f86 | ||
|
|
d8dc091267 | ||
|
|
1c44d8049a | ||
|
|
a95191d29e | ||
|
|
111f6e7f18 | ||
|
|
4a5c1e9ec4 | ||
|
|
8f0893b5f7 | ||
|
|
b16e705a6c | ||
|
|
3cad318b70 | ||
|
|
8c6002cae6 | ||
|
|
0355bbaf3b | ||
|
|
2ba083a650 | ||
|
|
c79ea5a257 | ||
|
|
44706f4957 | ||
|
|
a1b3bb03ed | ||
|
|
76caa16909 | ||
|
|
160b788198 | ||
|
|
eada62f62c | ||
|
|
bd9419e6db | ||
|
|
bdd9de3001 | ||
|
|
200ba4ed04 | ||
|
|
1e8939dd58 | ||
|
|
f45dd11e53 | ||
|
|
1a0cc1d64d | ||
|
|
421cb522d9 | ||
|
|
1b18b041d6 | ||
|
|
8788703ac6 | ||
|
|
b6c25e3ad9 | ||
|
|
73eaa68cd1 | ||
|
|
beb927f7b4 | ||
|
|
cdc969cd4e | ||
|
|
2a67499f12 | ||
|
|
6a3cc79daa | ||
|
|
97d4a947ee | ||
|
|
e0e47ad9a0 | ||
|
|
b08eac58e9 | ||
|
|
11409ccf21 | ||
|
|
e3b6c97c3b | ||
|
|
d3da086ebf | ||
|
|
3507fa40f1 | ||
|
|
6f8f1f1409 | ||
|
|
c2148a359d | ||
|
|
c172185a24 | ||
|
|
1140a5c4ae | ||
|
|
3cc378c960 | ||
|
|
9b3a961303 | ||
|
|
d048555149 | ||
|
|
7533858a52 | ||
|
|
c4e10ef0aa | ||
|
|
c20842e7cd | ||
|
|
6cfdb21313 | ||
|
|
e396f4d06f | ||
|
|
47c1bb6a5b | ||
|
|
adfb0b513e | ||
|
|
98d78b9d8a | ||
|
|
a1c32a56ea | ||
|
|
6584bcf87f | ||
|
|
7ac75af622 | ||
|
|
b3c283b282 | ||
|
|
c2615dd746 | ||
|
|
789518f70d | ||
|
|
ad3008d855 | ||
|
|
3da426603f | ||
|
|
8d26e34b0a | ||
|
|
110d1d7245 | ||
|
|
f7384623df | ||
|
|
5d24e166ab | ||
|
|
d9ec5bcd24 | ||
|
|
bf9cd7625b | ||
|
|
afbf98c974 | ||
|
|
fedb68cde7 | ||
|
|
f787937a30 | ||
|
|
f54fef7e7b | ||
|
|
e36c77aaf3 | ||
|
|
de45e48c37 | ||
|
|
ef0ce8224e | ||
|
|
5b4d5387bf | ||
|
|
5c460b38c9 | ||
|
|
8b836ab446 | ||
|
|
1be1fccc76 | ||
|
|
2c1fda97f0 | ||
|
|
71f7b719b5 | ||
|
|
e39006b511 | ||
|
|
37d07d415a | ||
|
|
b80c8f78fc | ||
|
|
7707179b93 | ||
|
|
4e7d8bacdb | ||
|
|
0c46fa5a56 | ||
|
|
36aca00de3 | ||
|
|
0ec8cf1b53 | ||
|
|
4b2b713e59 | ||
|
|
cc0afce237 | ||
|
|
620f3fc919 | ||
|
|
af949ef0dd | ||
|
|
475c5dc19a | ||
|
|
71cfe2364a | ||
|
|
c1466f8aca | ||
|
|
7989f73f06 | ||
|
|
c9a582fbcc | ||
|
|
63aad1e501 | ||
|
|
16ba12239c | ||
|
|
b00ae9256b | ||
|
|
936045e01c | ||
|
|
b1570ab117 | ||
|
|
f066e3b1e0 | ||
|
|
1487c0e51b | ||
|
|
9f244b9bd9 | ||
|
|
374ec27ab5 | ||
|
|
b222c34f12 | ||
|
|
007a096632 | ||
|
|
26e02e3773 | ||
|
|
b8668ca3ce | ||
|
|
21a2f9f93b | ||
|
|
8a74141e4b | ||
|
|
752d9d5316 | ||
|
|
58c7cc5d05 | ||
|
|
a790fb7afe | ||
|
|
5836cb1728 | ||
|
|
19fd219409 | ||
|
|
43f99e0bf7 | ||
|
|
6f83f6c1b5 | ||
|
|
3f9c177d76 | ||
|
|
55dd7e20a0 | ||
|
|
bfbf29b78f | ||
|
|
1b6d421a5b | ||
|
|
112d9c4086 | ||
|
|
adb089dc78 | ||
|
|
5024d270ec | ||
|
|
f4d5abfc5b | ||
|
|
f55cf3ab8d | ||
|
|
d35141a369 | ||
|
|
d450444596 | ||
|
|
7e11815409 | ||
|
|
017cd4cd6c | ||
|
|
ac6c2ff769 | ||
|
|
c4e8ca4b32 | ||
|
|
c9aec2f281 | ||
|
|
591561f657 | ||
|
|
2ad4054133 | ||
|
|
7883977a56 | ||
|
|
d5cb842db2 | ||
|
|
03bbb0571e | ||
|
|
1d355d74ef | ||
|
|
7f9913590e | ||
|
|
9e1d4e7855 | ||
|
|
a1f9b584dc | ||
|
|
7d474db765 | ||
|
|
367c0b38a6 | ||
|
|
cacd57f72b | ||
|
|
22dfc1e265 | ||
|
|
bffb6e1a07 | ||
|
|
cdff0c60d9 | ||
|
|
f55eb3cba9 | ||
|
|
6b8d4dd101 | ||
|
|
d05e130250 | ||
|
|
d33e50f367 | ||
|
|
f3c9c53b6c | ||
|
|
7d5b9c78b1 | ||
|
|
e6a4b7bbba | ||
|
|
ad0b269d53 | ||
|
|
5472570958 | ||
|
|
4576ba4db0 | ||
|
|
efcfab0955 | ||
|
|
1acd59c7d6 | ||
|
|
4951a2bf7a | ||
|
|
95fc26d4ad | ||
|
|
b65935d6cf | ||
|
|
2155fdd756 | ||
|
|
f2abc13ce2 | ||
|
|
0f4621fb02 | ||
|
|
c6ff641f6d | ||
|
|
350f74a53d | ||
|
|
41cd7acc87 | ||
|
|
c6eea26660 | ||
|
|
61c5718663 | ||
|
|
9897f4b527 | ||
|
|
978a6e5ecb | ||
|
|
a018997ddc | ||
|
|
de09843467 | ||
|
|
78a57fdb4b | ||
|
|
0bc2fd72f0 | ||
|
|
dda5164efd | ||
|
|
3df2396b63 | ||
|
|
d3da84e724 | ||
|
|
eb61015477 | ||
|
|
40c644f006 | ||
|
|
c9aa0180a8 | ||
|
|
a06e46885d | ||
|
|
60fa6e6c0a | ||
|
|
2f18f7927d | ||
|
|
292cf75836 | ||
|
|
fc95061f4c | ||
|
|
1f1275255c | ||
|
|
d8555e5a5d | ||
|
|
b323531dd5 | ||
|
|
cfb665310e | ||
|
|
51c6ebcd4d | ||
|
|
e94d1b6b9f | ||
|
|
ca7b32105d | ||
|
|
264db2737b | ||
|
|
5f2c9a6e45 | ||
|
|
19be1f1bf0 | ||
|
|
7cdf0000d9 | ||
|
|
13606e5e00 | ||
|
|
35af240faa | ||
|
|
0ac56f8973 | ||
|
|
6e5f8b1fb0 | ||
|
|
15e831c0b0 | ||
|
|
248952bc8f | ||
|
|
2373743eac | ||
|
|
f119596be6 | ||
|
|
b7cb41b388 | ||
|
|
a65ee26446 | ||
|
|
d3e2fbf1e2 | ||
|
|
66748ab5e5 | ||
|
|
c73a2c8f84 | ||
|
|
4bbcd99b8b | ||
|
|
02e7ff27c7 | ||
|
|
7ed3cea40b | ||
|
|
74f5cf8f29 | ||
|
|
086d13ca2f | ||
|
|
2780e96179 | ||
|
|
191678f9d6 | ||
|
|
79f595d8d1 | ||
|
|
db2865fb17 | ||
|
|
f945fa60d9 | ||
|
|
454988f657 | ||
|
|
7e0346d6eb | ||
|
|
00a90d1fe6 | ||
|
|
d6c185580a | ||
|
|
fd9132c15d | ||
|
|
42702e81b3 | ||
|
|
09c9d55695 | ||
|
|
69e9effc88 | ||
|
|
1c782c599f | ||
|
|
ed37071fd6 | ||
|
|
d73cf106b1 | ||
|
|
1d7982e80a | ||
|
|
d5d1984116 | ||
|
|
9eda1629bb | ||
|
|
9a5d49774e | ||
|
|
b2efebce96 | ||
|
|
85232bd704 | ||
|
|
df4e3aea79 | ||
|
|
290d45fd05 | ||
|
|
168e8c925c | ||
|
|
d9859b18fe | ||
|
|
784847f35b | ||
|
|
97287377d1 | ||
|
|
a15b66e003 | ||
|
|
a441b4b90d | ||
|
|
0dcc1390a6 | ||
|
|
01c86636e9 | ||
|
|
846c27d579 | ||
|
|
db05059b42 | ||
|
|
b824328850 | ||
|
|
a8767a2b1a | ||
|
|
5e14e7fb70 | ||
|
|
fbaa7be52e | ||
|
|
b6016b244e | ||
|
|
e339a64261 | ||
|
|
17e18442ab | ||
|
|
e8aa3a17a6 | ||
|
|
bdb97eab86 | ||
|
|
690000254c | ||
|
|
6a0b778978 | ||
|
|
549d141053 | ||
|
|
c31ecdb8de | ||
|
|
8a09d044c7 | ||
|
|
a3b5b89930 | ||
|
|
ad6f100f6a | ||
|
|
3cfe21af58 | ||
|
|
b70a660975 | ||
|
|
04c1d1389f | ||
|
|
f12156bf81 | ||
|
|
0177ac660b | ||
|
|
361b9b4ce4 | ||
|
|
78792bd11c | ||
|
|
8b38ddfcd9 | ||
|
|
78ddf50d2d | ||
|
|
93dcb20e12 | ||
|
|
41a71e1dee | ||
|
|
a5ed8ad58c | ||
|
|
e45ed85b55 | ||
|
|
52474f9103 | ||
|
|
c2587da27d | ||
|
|
26036877b2 | ||
|
|
906cdd9050 | ||
|
|
762662d056 | ||
|
|
1de4b38766 | ||
|
|
6c73ab823b | ||
|
|
5ef1651151 | ||
|
|
8d695bc8d7 | ||
|
|
c892d055ed | ||
|
|
b327e54be1 | ||
|
|
989045489c | ||
|
|
888338c60e | ||
|
|
e6c6cc7811 | ||
|
|
fa0e72bd69 | ||
|
|
18decac44d | ||
|
|
1012a0cf2b | ||
|
|
7e4de945cf | ||
|
|
a468272726 | ||
|
|
039d8f000d | ||
|
|
2dc181c75e | ||
|
|
d35f960a8a | ||
|
|
634f8ed574 | ||
|
|
d369451308 | ||
|
|
8f1202424d | ||
|
|
0a6833e9d8 | ||
|
|
8f80fc4e2c | ||
|
|
50e5813222 | ||
|
|
7bc268aeaa | ||
|
|
537b5b1e25 | ||
|
|
aae38f8ce7 | ||
|
|
ad05432bcf | ||
|
|
8aa983257d | ||
|
|
046a97d1e5 | ||
|
|
d28649b13d | ||
|
|
3e16ca37bc | ||
|
|
2da38a5bdc | ||
|
|
bbe1d8b52e | ||
|
|
97c85e39c3 | ||
|
|
a7b59e5b12 | ||
|
|
9eb1252ce9 | ||
|
|
0e01e13670 | ||
|
|
239e61e718 | ||
|
|
22549e9fd8 | ||
|
|
1f9fd24064 | ||
|
|
a7594740e3 | ||
|
|
945c72cf6c | ||
|
|
824b0c0132 | ||
|
|
51e9f2f579 | ||
|
|
e8ec33d9d0 | ||
|
|
3bbbaf12fd | ||
|
|
30ffacd879 | ||
|
|
75e9b7791c | ||
|
|
4b665ab19a | ||
|
|
08265ed1d7 | ||
|
|
cded9af90f | ||
|
|
4e1f2ad017 | ||
|
|
7f92b7072d | ||
|
|
4a589ba6a4 | ||
|
|
7f16325fcc | ||
|
|
b62e5bf34c | ||
|
|
bd6b348cc7 | ||
|
|
62f35fe8c8 | ||
|
|
cb2cb4659c | ||
|
|
a2c58415cf | ||
|
|
2cb9987c99 | ||
|
|
36584cfb7c | ||
|
|
b825ad6a12 | ||
|
|
f8545d4c61 | ||
|
|
9b42ef5d46 | ||
|
|
05ddfc0495 | ||
|
|
53b2cebb66 | ||
|
|
58c69e36a1 | ||
|
|
837fb71a24 | ||
|
|
2e13cf5f74 | ||
|
|
0ae1681d9c | ||
|
|
ebb66ba8fb | ||
|
|
e79354a039 | ||
|
|
a57beb1de4 | ||
|
|
1648c44ee2 | ||
|
|
efe47a149e | ||
|
|
2d66a2f0f3 | ||
|
|
43a1f1314e | ||
|
|
4f4b282d7c | ||
|
|
d3d4da18e5 | ||
|
|
b8da583986 | ||
|
|
73f6b42715 | ||
|
|
0e2a4efdaa | ||
|
|
6798e16aaf | ||
|
|
c9cc64ecfc | ||
|
|
761f9045ac | ||
|
|
dfae979287 | ||
|
|
fe917affd2 | ||
|
|
d44207dd7f | ||
|
|
ec8b1403bd | ||
|
|
6f3d108c1e | ||
|
|
c34ee9c1f9 | ||
|
|
2a3f049336 | ||
|
|
0c91011e88 | ||
|
|
8bcd8719aa | ||
|
|
29a8af509b | ||
|
|
d3cd9f17f9 | ||
|
|
b9aea8c5ec | ||
|
|
897619a961 | ||
|
|
e6c4706b73 | ||
|
|
8994c50d34 | ||
|
|
55b62e47eb | ||
|
|
c6ecf70377 | ||
|
|
f0cd7d27fb | ||
|
|
f923bb499b | ||
|
|
aa3a29fed2 | ||
|
|
47d3011c85 | ||
|
|
cec713a47a | ||
|
|
bf6d0c0a74 | ||
|
|
c11672fca3 | ||
|
|
e086b654aa | ||
|
|
1107f691ea | ||
|
|
b095ca5756 | ||
|
|
4afc0e8ed0 | ||
|
|
141b377b4e | ||
|
|
402a478785 | ||
|
|
73680584f3 | ||
|
|
45dbbcd179 | ||
|
|
83d25bfa00 | ||
|
|
299e27af15 | ||
|
|
ec4cd5ed48 | ||
|
|
59d2733b88 | ||
|
|
cbdd088188 | ||
|
|
2d52485d7b | ||
|
|
d830178ef8 | ||
|
|
049984b4cc | ||
|
|
d261a986ab | ||
|
|
9b2e25735b | ||
|
|
e09e75b0ba | ||
|
|
6630113fef | ||
|
|
b2f08c9c20 | ||
|
|
6a4315b7e7 | ||
|
|
8b3e62ff6d | ||
|
|
f1d3f6740d | ||
|
|
9ccd1d920c | ||
|
|
9674d75ff6 | ||
|
|
22fd74846d | ||
|
|
777645888a | ||
|
|
ac8e344173 | ||
|
|
16fad60833 | ||
|
|
cb96a39b46 | ||
|
|
a540634b5b | ||
|
|
e15576bc47 | ||
|
|
95359760ae | ||
|
|
be209cb7b6 | ||
|
|
f5eb80759b | ||
|
|
9f125502f8 | ||
|
|
3f856c4b1c | ||
|
|
f55fb1e3a5 | ||
|
|
bf88bd5da5 | ||
|
|
b7112e02db | ||
|
|
347c796662 | ||
|
|
9bed7f7a9b | ||
|
|
b136166fc9 | ||
|
|
75727c3d68 | ||
|
|
6c625b3359 | ||
|
|
60759a4e3b | ||
|
|
582a66bb2f | ||
|
|
d78f78bb5c | ||
|
|
71b7d062d5 | ||
|
|
c6138a0660 | ||
|
|
ce4ac97269 | ||
|
|
2088a86512 | ||
|
|
e296fe2b98 | ||
|
|
96b8890ecc | ||
|
|
db6fae2f5b | ||
|
|
6743cdbb65 | ||
|
|
71466c9a27 | ||
|
|
1bdf7e3192 | ||
|
|
7285f3c844 | ||
|
|
eb257d3aa7 | ||
|
|
87f11491d9 | ||
|
|
5735a02473 | ||
|
|
47dd9b5a03 | ||
|
|
7652d7889b | ||
|
|
dd2116c897 | ||
|
|
c5566b3e94 | ||
|
|
30cbf02bff | ||
|
|
9e4e9b4f1a | ||
|
|
6f290f28b6 | ||
|
|
6ff3c9015b | ||
|
|
e28b82b2b7 | ||
|
|
3edf124f96 | ||
|
|
fb72b46a3c | ||
|
|
49bf395f61 | ||
|
|
eab14b6c49 | ||
|
|
8b962fb8e8 | ||
|
|
e5a3c861cb | ||
|
|
c7bb3d63b0 | ||
|
|
e6b543c15e | ||
|
|
8137517d93 | ||
|
|
572f6a7fab | ||
|
|
c6d9201680 | ||
|
|
7dcb3af944 | ||
|
|
4bc183a8a1 | ||
|
|
9f83311931 | ||
|
|
10986d3a7c | ||
|
|
f4f6efa547 | ||
|
|
bf64259af3 | ||
|
|
6141ba84ce | ||
|
|
329902f0db | ||
|
|
bfcaa7a443 | ||
|
|
45915bf0ed | ||
|
|
ee7f2a541f | ||
|
|
59a00eae98 | ||
|
|
df8293bee6 | ||
|
|
935216f179 | ||
|
|
f56bbd46fd | ||
|
|
9f0f18c5c4 | ||
|
|
191c34c9c4 | ||
|
|
6a604b3002 | ||
|
|
5a435b533e | ||
|
|
4b027722b1 | ||
|
|
68ce8642b1 | ||
|
|
4913b6a0f1 | ||
|
|
aee0ab05f4 | ||
|
|
b44432f24a | ||
|
|
86be13ff1f | ||
|
|
ee95df0e57 | ||
|
|
442c29f020 | ||
|
|
739037fc37 | ||
|
|
f8252020aa | ||
|
|
38b87439fe | ||
|
|
116879f7ea | ||
|
|
2eafb2f067 | ||
|
|
c36f0f6f7f | ||
|
|
bfc033959b | ||
|
|
814f350b6d | ||
|
|
05db8ce582 | ||
|
|
3fd36a0c72 | ||
|
|
cbb12b29bd | ||
|
|
6ed30f1add | ||
|
|
a044c41c66 | ||
|
|
fb78e53a14 | ||
|
|
acfbbaa549 | ||
|
|
d52d74c64c | ||
|
|
d36f73de01 | ||
|
|
628c4a7b5f | ||
|
|
ca07a663e1 | ||
|
|
66d008391e | ||
|
|
eef84bda26 | ||
|
|
e0defe71aa | ||
|
|
069257151e | ||
|
|
3f80a3b39e | ||
|
|
b2a56161bb | ||
|
|
5e75639244 | ||
|
|
cb2cd3e10f | ||
|
|
0acb911d6a | ||
|
|
17ad7060b3 | ||
|
|
f38ba7fcd3 | ||
|
|
a3464068bd | ||
|
|
347ecc028f | ||
|
|
94ac60fa09 | ||
|
|
d567e23e50 | ||
|
|
8ff81562d2 | ||
|
|
7a8142ed92 | ||
|
|
eaba1b9cc8 | ||
|
|
b08b3546d2 | ||
|
|
7453e688fd | ||
|
|
32b097b3f2 | ||
|
|
22394def78 | ||
|
|
68ecb7fbdd | ||
|
|
de98a53b43 | ||
|
|
1c9fbf92c6 | ||
|
|
c068b05232 | ||
|
|
15338ecb18 | ||
|
|
01e9a8f720 | ||
|
|
4bdfe64afb | ||
|
|
b7b752b92f | ||
|
|
b7bcd204b4 | ||
|
|
ec934ba3c0 | ||
|
|
7373639f57 | ||
|
|
d718527a1f | ||
|
|
48add0f293 | ||
|
|
a4685229c9 | ||
|
|
f0bc4d26a0 | ||
|
|
1d3b93d88d | ||
|
|
62752ba7e1 | ||
|
|
6a4f420187 | ||
|
|
6640632683 | ||
|
|
09d5d802d0 | ||
|
|
fea23ed6d4 | ||
|
|
10a6c4dc7a | ||
|
|
4cdaa72224 | ||
|
|
27bc1ca5d1 | ||
|
|
1ea49188c9 | ||
|
|
3084ef129c | ||
|
|
c0d112f858 | ||
|
|
2265dda84c | ||
|
|
263b094cab | ||
|
|
fbd13614a5 | ||
|
|
9eab74b595 | ||
|
|
5acdb041a9 | ||
|
|
0494d7ebe3 | ||
|
|
9a8442c946 | ||
|
|
e1dcd0b441 | ||
|
|
a152db7054 | ||
|
|
b9e092674e | ||
|
|
4162b5f41d | ||
|
|
67ae6f210f | ||
|
|
f6c5a46626 | ||
|
|
d6f7e01c53 | ||
|
|
46463e4e24 | ||
|
|
bc99509395 | ||
|
|
5c420f3a34 | ||
|
|
393712ead2 | ||
|
|
d3060b0060 | ||
|
|
14d7f04a81 | ||
|
|
1a28e5e0d4 | ||
|
|
884cd0d636 | ||
|
|
6a7a3c0ae8 | ||
|
|
948e6bd57c | ||
|
|
78595fba0b | ||
|
|
8020284b12 | ||
|
|
d6a49da870 | ||
|
|
84da80356d | ||
|
|
bcbb85eac3 | ||
|
|
0e1d8a72e6 | ||
|
|
bbdd698869 | ||
|
|
bae1e1ee9f | ||
|
|
7138785500 | ||
|
|
8f684ffa6d | ||
|
|
9be3666fe7 | ||
|
|
b7785678f4 | ||
|
|
d8005b4cf6 | ||
|
|
52028fc3bc | ||
|
|
5285ec23ae | ||
|
|
3c882e5c57 | ||
|
|
1a33f9168b | ||
|
|
ccae3d7383 | ||
|
|
847651a90a | ||
|
|
1b8998e7a2 | ||
|
|
dc8fb79759 | ||
|
|
6b0935d6cf | ||
|
|
d1183ce272 | ||
|
|
a1aec8178a | ||
|
|
ad569a8a36 | ||
|
|
0d9fdbaac1 | ||
|
|
f5cd3eab9e | ||
|
|
cb6fe4bb59 | ||
|
|
db36bc67f1 | ||
|
|
e0f72a6193 | ||
|
|
1ee684b7c0 | ||
|
|
93005512b4 | ||
|
|
8987cd64a0 | ||
|
|
fac51dcf03 | ||
|
|
01101a4c9b | ||
|
|
d561e40817 | ||
|
|
b8094fd771 | ||
|
|
af5d9c952d | ||
|
|
ce4e187cbc | ||
|
|
821c80b61e | ||
|
|
5a6fb7c973 | ||
|
|
0cb298ebdf | ||
|
|
0f385f9f4e | ||
|
|
a149368725 | ||
|
|
afeefe8259 | ||
|
|
690d3c27a2 | ||
|
|
3d56ea5ce5 | ||
|
|
fdff7f80a3 | ||
|
|
fe6978b107 | ||
|
|
57db6865d2 | ||
|
|
d235d5ab28 | ||
|
|
c47c15ee47 | ||
|
|
613dfe06d3 | ||
|
|
6803ad2e59 | ||
|
|
d5a791b470 | ||
|
|
a312d61d68 | ||
|
|
e414c1f7b0 | ||
|
|
955359b073 | ||
|
|
26e0c0887a | ||
|
|
4c295b564a | ||
|
|
2eb52da0db | ||
|
|
d8bfb3ab13 | ||
|
|
d970e93507 | ||
|
|
e6255081a8 | ||
|
|
623db0ed94 | ||
|
|
0e575e9c25 | ||
|
|
fb23ba9878 | ||
|
|
4e09fc7f43 | ||
|
|
64cfdd815f | ||
|
|
f6f31e0a8d | ||
|
|
bd5fb9be03 | ||
|
|
762714de68 | ||
|
|
82a3651a18 | ||
|
|
dd9cdb0ec9 | ||
|
|
7f082a821d | ||
|
|
abe0352de9 | ||
|
|
4cee4aa5a8 | ||
|
|
9c68c7c50b | ||
|
|
0608782cfa | ||
|
|
edeaf3794a | ||
|
|
fe2b8c8afa | ||
|
|
b66bf58064 | ||
|
|
957dfa9cdf | ||
|
|
cc9264854e | ||
|
|
d1463b3e24 | ||
|
|
f1082520e1 | ||
|
|
733c563194 | ||
|
|
0200d043c3 | ||
|
|
9c475c36e7 | ||
|
|
c663c5c507 | ||
|
|
1e93c38307 | ||
|
|
81baf808c9 | ||
|
|
74537689dc | ||
|
|
12ab01d5e6 | ||
|
|
044d3a0ff9 | ||
|
|
659cae6a4c | ||
|
|
8efc38ad82 | ||
|
|
bd5882f0f0 | ||
|
|
6ff9ba9df9 | ||
|
|
b2df398a12 | ||
|
|
83d618e1eb | ||
|
|
f0768b3af1 |
@@ -7,8 +7,7 @@ insert_final_newline = true
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
|
||||
[*.{md,yml,yaml,json,toml,htm,html}]
|
||||
[*.{md,yml,yaml,json,toml,htm,html,js,css,svg,sh,bash,fish}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
2
.github/CODE_OF_CONDUCT.md
vendored
2
.github/CODE_OF_CONDUCT.md
vendored
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at andrey.nering@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at andrey@nering.com.br. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
|
||||
16
.github/CONTRIBUTING.md
vendored
16
.github/CONTRIBUTING.md
vendored
@@ -1,6 +1,14 @@
|
||||
* Bug reports and feature requests are welcome in [the issues][issues]
|
||||
* Pull Requests are welcome. For more complex changes and features it's
|
||||
recommended to open an issue with the feature request first
|
||||
* Documentation contributions are as important as code contributions
|
||||
## You can find our [contribution guide on our website][contributing]
|
||||
|
||||
- Please read it carefully before opening a PR.
|
||||
- If you have any questions, you can:
|
||||
- [Open an issue][issues]
|
||||
- [Create a discussion][discussions]
|
||||
- [Chat to us on Discord][discord]
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[contributing]: https://taskfile.dev/contributing
|
||||
[issues]: https://github.com/go-task/task/issues
|
||||
[discussions]: https://github.com/go-task/task/discussions
|
||||
[discord]: https://discord.gg/6TY36E39UK
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
github: [andreynering, pd93]
|
||||
open_collective: task
|
||||
custom: https://taskfile.dev/donate/
|
||||
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,6 +0,0 @@
|
||||
<!--
|
||||
If relevant, include the following information:
|
||||
- Task version
|
||||
- OS
|
||||
- Example Taskfile showing the issue
|
||||
-->
|
||||
20
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Use this to report bugs and issues
|
||||
---
|
||||
|
||||
<!--
|
||||
|
||||
Thanks for your bug report!
|
||||
|
||||
Before submitting this issue, please make sure the same problem was not
|
||||
already reported by someone else.
|
||||
|
||||
Please describe the bug you're facing. Consider pasting example Taskfiles
|
||||
showing how to reproduce the problem.
|
||||
|
||||
-->
|
||||
|
||||
- Task version:
|
||||
- Operating system:
|
||||
- Experiments enabled:
|
||||
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Extension for Visual Studio Code
|
||||
url: https://github.com/go-task/vscode-task
|
||||
about: Issues related to the Visual Studio Code extension should be opened here.
|
||||
- name: Help forum on Discord
|
||||
url: https://discord.com/channels/974121106208354339/1025054680289660989
|
||||
about: 'The Discord #help channel is the best way to get help from the community.'
|
||||
- name: Questions, Ideas and General Discussions
|
||||
url: https://github.com/go-task/task/discussions
|
||||
about: Ask questions and discuss general ideas with the community.
|
||||
15
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
15
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Use this to make feature requests
|
||||
---
|
||||
|
||||
<!--
|
||||
|
||||
Describe in detail what feature do you want to see in Task.
|
||||
Give examples if possible.
|
||||
|
||||
Please, search if this wasn't proposed before, and if this is more like an idea
|
||||
than a strong feature request, consider opening a
|
||||
[discussion](https://github.com/go-task/task/discussions) instead.
|
||||
|
||||
-->
|
||||
24
.github/dependabot.yml
vendored
Normal file
24
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- package-ecosystem: gomod
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: saturday
|
||||
time: '08:00'
|
||||
timezone: America/Sao_Paulo
|
||||
labels:
|
||||
- "area: dependencies"
|
||||
- "lang: go"
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: saturday
|
||||
time: '08:00'
|
||||
timezone: America/Sao_Paulo
|
||||
labels:
|
||||
- "area: dependencies"
|
||||
- "lang: javascript"
|
||||
5
.github/pull_request_template.md
vendored
Normal file
5
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
> Thanks for your pull request, we really appreciate contributions!
|
||||
>
|
||||
> Please understand that it may take some time to be reviewed.
|
||||
>
|
||||
> Also, make sure to follow the [Contribution Guide](https://taskfile.dev/contributing/).
|
||||
43
.github/workflows/issue-awaiting-response.yml
vendored
Normal file
43
.github/workflows/issue-awaiting-response.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: issue awaiting response
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
issue-awaiting-response:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
const issue = await github.rest.issues.get({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
})
|
||||
const comments = await github.paginate(
|
||||
github.rest.issues.listComments, {
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
}
|
||||
)
|
||||
const labels = await github.paginate(
|
||||
github.rest.issues.listLabelsOnIssue, {
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
}
|
||||
)
|
||||
if (labels.find(label => label.name === 'state: awaiting response')) {
|
||||
if (comments[comments.length-1].user?.login === issue.data.user?.login) {
|
||||
github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
name: 'state: awaiting response'
|
||||
})
|
||||
}
|
||||
}
|
||||
29
.github/workflows/issue-closed.yml
vendored
Normal file
29
.github/workflows/issue-closed.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: issue closed
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
issue-closed:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
const labels = await github.paginate(
|
||||
github.rest.issues.listLabelsOnIssue, {
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
}
|
||||
)
|
||||
if (labels.find(label => label.name === 'state: needs triage')) {
|
||||
github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
name: 'state: needs triage'
|
||||
})
|
||||
}
|
||||
123
.github/workflows/issue-experiment.yml
vendored
Normal file
123
.github/workflows/issue-experiment.yml
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
name: issue experiment
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
issue-experiment-proposed:
|
||||
if: github.event.label.name == format('experiment{0} proposed', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This issue has been marked as an experiment proposal! :test_tube: It will now enter a period of consultation during which we encourage the community to provide feedback on the proposed design. Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
issue-experiment-draft:
|
||||
if: github.event.label.name == format('experiment{0} draft', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This experiment has been marked as a draft! :sparkles: This means that an initial implementation has been added to the latest release of Task! You can find information about this experiment and how to enable it in our [experiments documentation](https://taskfile.dev/experiments). Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
issue-experiment-candidate:
|
||||
if: github.event.label.name == format('experiment{0} candidate', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This experiment has been marked as a candidate! :fire: This means that the implementation is nearing completion and we are entering a period for final comments and feedback! You can find information about this experiment and how to enable it in our [experiments documentation](https://taskfile.dev/experiments). Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
issue-experiment-stable:
|
||||
if: github.event.label.name == format('experiment{0} stable', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This experiment has been marked as stable! :metal: This means that the implementation is now final and ready to be released. No more changes will be made and the experiment is safe to use in production! You can find information about this experiment and how to enable it in our [experiments documentation](https://taskfile.dev/experiments). Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
issue-experiment-released:
|
||||
if: github.event.label.name == format('experiment{0} released', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This experiment has been released! :rocket: This means that it is no longer an experiment and is available in the latest major version of Task. Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
github.rest.issues.update({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed'
|
||||
})
|
||||
issue-experiment-abandoned:
|
||||
if: github.event.label.name == format('experiment{0} abandoned', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This experiment has been abandoned. :disappointed: This means that this feature will not be added to Task and any experimental functionality will be removed. Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
github.rest.issues.update({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed'
|
||||
})
|
||||
issue-experiment-superseded:
|
||||
if: github.event.label.name == format('experiment{0} superseded', ':')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'This experiment has been superseded. :seedling: This means that another experiment has replaced this one. Please see the [experiment workflow documentation](https://taskfile.dev/experiments/workflow) for more information on how we release experiments.'
|
||||
})
|
||||
github.rest.issues.update({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed'
|
||||
})
|
||||
29
.github/workflows/issue-needs-triage.yml
vendored
Normal file
29
.github/workflows/issue-needs-triage.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: issue needs triage
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
issue-needs-triage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GH_PAT}}
|
||||
script: |
|
||||
const labels = await github.paginate(
|
||||
github.rest.issues.listLabelsOnIssue, {
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
}
|
||||
)
|
||||
if (labels.length === 0) {
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['state: needs triage']
|
||||
})
|
||||
}
|
||||
24
.github/workflows/lint.yml
vendored
Normal file
24
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.20.x
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.51.1
|
||||
26
.github/workflows/release.yml
vendored
Normal file
26
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.20.x
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GH_PAT}}
|
||||
36
.github/workflows/sync-translated-documents.yml
vendored
Normal file
36
.github/workflows/sync-translated-documents.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Sync Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
sync-translated-documents:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'go-task/task'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Sync Translations
|
||||
run: task crowdin:pull
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
working-directory: ./docs
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: "chore: sync translations"
|
||||
title: "chore: sync translations"
|
||||
branch: chore/sync-translations
|
||||
delete-branch: true
|
||||
author: task-bot <106601941+task-bot@users.noreply.github.com>
|
||||
labels: "area: translation"
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
38
.github/workflows/test.yml
vendored
Normal file
38
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.19.x, 1.20.x]
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{matrix.platform}}
|
||||
steps:
|
||||
- name: Set up Go ${{matrix.go-version}}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{matrix.go-version}}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Go modules
|
||||
run: go mod download
|
||||
env:
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
- name: Build
|
||||
run: go build -o ./bin/task -v ./cmd/task
|
||||
|
||||
- name: Test
|
||||
run: ./bin/task test --output=group --output-group-begin='::group::{{.TASK}}' --output-group-end='::endgroup::'
|
||||
38
.github/workflows/upload-source-documents.yml
vendored
Normal file
38
.github/workflows/upload-source-documents.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Upload Source Documents
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push_files_to_crowdin:
|
||||
name: Push files to Crowdin
|
||||
if: github.repository == 'go-task/task'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Verify changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35
|
||||
with:
|
||||
files: |
|
||||
docs/docs
|
||||
docs/blog
|
||||
docs/i18n/en
|
||||
docs/src/pages
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload source documents
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
run: task crowdin:push
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
working-directory: ./docs
|
||||
37
.github/workflows/website-deploy.yml
vendored
Normal file
37
.github/workflows/website-deploy.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Website Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
website-deploy:
|
||||
name: Website Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
working-directory: ./docs
|
||||
|
||||
- name: Build website
|
||||
run: yarn build
|
||||
working-directory: ./docs
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
|
||||
- name: Website Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GH_PAT }}
|
||||
publish_dir: ./docs/build
|
||||
user_name: task-bot
|
||||
user_email: 106601941+task-bot@users.noreply.github.com
|
||||
29
.github/workflows/website-test.yml
vendored
Normal file
29
.github/workflows/website-test.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Website Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
website-test:
|
||||
name: Website Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
working-directory: ./docs
|
||||
|
||||
- name: Test build website
|
||||
run: yarn build
|
||||
working-directory: ./docs
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -19,5 +19,16 @@ dist/
|
||||
|
||||
.DS_Store
|
||||
|
||||
# intellij idea/goland
|
||||
# editors
|
||||
.idea/
|
||||
.vscode/
|
||||
.fleet/
|
||||
|
||||
# exuberant ctags
|
||||
tags
|
||||
|
||||
/bin/*
|
||||
!/bin/.keep
|
||||
/testdata/vars/v1
|
||||
/tmp
|
||||
node_modules
|
||||
|
||||
18
.golangci.yml
Normal file
18
.golangci.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
# NOTE(@andreynering): The linters listed here are additions on top of
|
||||
# those enabled by default:
|
||||
#
|
||||
# https://golangci-lint.run/usage/linters/#enabled-by-default
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- goimports
|
||||
- gofmt
|
||||
- gofumpt
|
||||
|
||||
linters-settings:
|
||||
goimports:
|
||||
local-prefixes: github.com/go-task/task
|
||||
gofmt:
|
||||
rewrite-rules:
|
||||
- pattern: 'interface{}'
|
||||
replacement: 'any'
|
||||
@@ -1,25 +1,41 @@
|
||||
build:
|
||||
binary: task
|
||||
main: cmd/task/task.go
|
||||
main: ./cmd/task
|
||||
goos:
|
||||
- windows
|
||||
- darwin
|
||||
- linux
|
||||
- freebsd
|
||||
goarch:
|
||||
- 386
|
||||
- '386'
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
goarm:
|
||||
- '6'
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: 386
|
||||
goarch: '386'
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s -w # Don't set main.version.
|
||||
|
||||
archive:
|
||||
name_template: "{{.Binary}}_{{.Os}}_{{.Arch}}"
|
||||
gomod:
|
||||
proxy: true
|
||||
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
archives:
|
||||
- name_template: "{{.Binary}}_{{.Os}}_{{.Arch}}"
|
||||
files:
|
||||
- README.md
|
||||
- LICENSE
|
||||
- completion/**/*
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
|
||||
release:
|
||||
draft: true
|
||||
@@ -30,15 +46,42 @@ snapshot:
|
||||
checksum:
|
||||
name_template: "task_checksums.txt"
|
||||
|
||||
nfpm:
|
||||
vendor: Task
|
||||
homepage: https://github.com/go-task/task
|
||||
maintainer: Andrey Nering <andrey.nering@gmail.com>
|
||||
description: Simple task runner written in Go
|
||||
license: MIT
|
||||
conflicts:
|
||||
- taskwarrior
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
|
||||
nfpms:
|
||||
- vendor: Task
|
||||
homepage: https://taskfile.dev
|
||||
maintainer: Andrey Nering <andrey@nering.com.br>
|
||||
description: Simple task runner written in Go
|
||||
license: MIT
|
||||
conflicts:
|
||||
- taskwarrior
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
file_name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
|
||||
contents:
|
||||
- src: completion/bash/task.bash
|
||||
dst: /etc/bash_completion.d/task
|
||||
- src: completion/fish/task.fish
|
||||
dst: /usr/share/fish/completions/task.fish
|
||||
- src: completion/zsh/_task
|
||||
dst: /usr/local/share/zsh/site-functions/_task
|
||||
|
||||
brews:
|
||||
- name: go-task
|
||||
description: Task runner / simpler Make alternative written in Go
|
||||
license: MIT
|
||||
homepage: https://taskfile.dev
|
||||
folder: Formula
|
||||
tap:
|
||||
owner: go-task
|
||||
name: homebrew-tap
|
||||
test:
|
||||
system "#{bin}/task", "--help"
|
||||
install: |-
|
||||
bin.install "task"
|
||||
bash_completion.install "completion/bash/task.bash" => "task"
|
||||
zsh_completion.install "completion/zsh/_task" => "_task"
|
||||
fish_completion.install "completion/fish/task.fish"
|
||||
commit_author:
|
||||
name: task-bot
|
||||
email: 106601941+task-bot@users.noreply.github.com
|
||||
|
||||
4
.mockery.yaml
Normal file
4
.mockery.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
with-expecter: true
|
||||
keeptree: true
|
||||
case: underscore
|
||||
output: ./internal/mocks
|
||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
docs/docs/changelog.md
|
||||
7
.prettierrc.yml
Normal file
7
.prettierrc.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
trailingComma: none
|
||||
singleQuote: true
|
||||
overrides:
|
||||
- files: "*.md"
|
||||
options:
|
||||
printWidth: 80
|
||||
proseWrap: always
|
||||
22
.travis.yml
22
.travis.yml
@@ -1,22 +0,0 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- rpm
|
||||
|
||||
script:
|
||||
- go install github.com/go-task/task/cmd/task
|
||||
- task ci
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: curl -sL http://git.io/goreleaser | bash
|
||||
on:
|
||||
tags: true
|
||||
condition: $TRAVIS_OS_NAME = linux
|
||||
587
CHANGELOG.md
587
CHANGELOG.md
@@ -1,10 +1,500 @@
|
||||
# Changelog
|
||||
|
||||
## v3.26.0 = 2023-06-10
|
||||
|
||||
- Only rewrite checksum files in `.task` if the checksum has changed (#1185,
|
||||
#1194 by @deviantintegral).
|
||||
- Added [experiments documentation](https://taskfile.dev/experiments) to the
|
||||
website (#1198 by @pd93).
|
||||
- Deprecated `version: 2` schema. This will be removed in the next major release
|
||||
(#1197, #1198, #1199 by @pd93).
|
||||
- Added a new `prompt:` prop to set a warning prompt to be shown before running
|
||||
a potential dangurous task (#100, #1163 by @MaxCheetham,
|
||||
[Documentation](https://taskfile.dev/usage/#warning-prompts)).
|
||||
- Added support for single command task syntax. With this change, it's now
|
||||
possible to declare just `cmd:` in a task, avoiding the more complex
|
||||
`cmds: []` when you have only a single command for that task
|
||||
(#1130, #1131 by @timdp).
|
||||
|
||||
## v3.25.0 - 2023-05-22
|
||||
|
||||
- Support `silent:` when calling another tasks (#680, #1142 by @danquah).
|
||||
- Improve PowerShell completion script (#1168 by @trim21).
|
||||
- Add more languages to the website menu and show translation progress
|
||||
percentage (#1173 by @misitebao).
|
||||
- Starting on this release, official binaries for FreeBSD will be available to
|
||||
download (#1068 by @andreynering).
|
||||
- Fix some errors being unintendedly supressed (#1134 by @clintmod).
|
||||
- Fix a nil pointer error when `version` is omitted from a Taskfile (#1148,
|
||||
#1149 by @pd93).
|
||||
- Fix duplicate error message when a task does not exists (#1141, #1144 by
|
||||
@pd93).
|
||||
|
||||
## v3.24.0 - 2023-04-15
|
||||
|
||||
- Fix Fish shell completion for tasks with aliases (#1113 by @patricksjackson).
|
||||
- The default branch was renamed from `master` to `main` (#1049, #1048 by
|
||||
@pd93).
|
||||
- Fix bug where "up-to-date" logs were not being omitted for silent tasks (#546,
|
||||
#1107 by @danquah).
|
||||
- Add `.hg` (Mercurial) to the list of ignored directories when using `--watch`
|
||||
(#1098 by @misery).
|
||||
- More improvements to the release tool (#1096 by @pd93).
|
||||
- Enforce [gofumpt](https://github.com/mvdan/gofumpt) linter (#1099 by @pd93)
|
||||
- Add `--sort` flag for use with `--list` and `--list-all` (#946, #1105 by
|
||||
@pd93).
|
||||
- Task now has [custom exit codes](https://taskfile.dev/api/#exit-codes)
|
||||
depending on the error (#1114 by @pd93).
|
||||
|
||||
## v3.23.0 - 2023-03-26
|
||||
|
||||
Task now has an
|
||||
[official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task)
|
||||
contributed by @pd93! :tada: The extension is maintained in a
|
||||
[new repository](https://github.com/go-task/vscode-task) 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](https://github.com/go-task/vscode-task/discussions),
|
||||
[issue](https://github.com/go-task/vscode-task/issues) or on our
|
||||
[Discord](https://discord.gg/6TY36E39UK)!
|
||||
|
||||
> **NOTE:** The extension _requires_ v3.23.0 to be installed in order to work.
|
||||
|
||||
- The website was integrated with
|
||||
[Crowdin](https://crowdin.com/project/taskfile) to allow the community to
|
||||
contribute with translations! [Chinese](https://taskfile.dev/zh-Hans/) is the
|
||||
first language available (#1057, #1058 by @misitebao).
|
||||
- Added task location data to the `--json` flag output (#1056 by @pd93)
|
||||
- Change the name of the file generated by `task --init` from `Taskfile.yaml` to
|
||||
`Taskfile.yml` (#1062 by @misitebao).
|
||||
- Added new `splitArgs` template function
|
||||
(`{{splitArgs "foo bar 'foo bar baz'"}}`) to ensure string is split as
|
||||
arguments (#1040, #1059 by @dhanusaputra).
|
||||
- Fix the value of `{{.CHECKSUM}}` variable in status (#1076, #1080 by @pd93).
|
||||
- Fixed deep copy implementation (#1072 by @pd93)
|
||||
- Created a tool to assist with releases (#1086 by @pd93).
|
||||
|
||||
## v3.22.0 - 2023-03-10
|
||||
|
||||
- Add a brand new `--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](https://taskfile.dev/usage/#running-a-global-taskfile), #1029
|
||||
by @andreynering).
|
||||
- Add ability to set `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).
|
||||
- Fixed bug where `.task/checksum` file was sometimes not being created when
|
||||
task also declares a `status:` (#840, #1035 by @harelwa, #1037 by @pd93).
|
||||
- Refactored and decoupled fingerprinting from the main Task executor (#1039 by
|
||||
@pd93).
|
||||
- Fixed deadlock issue when using `run: once` (#715, #1025 by
|
||||
@theunrepentantgeek).
|
||||
|
||||
## v3.21.0 - 2023-02-22
|
||||
|
||||
- Added new `TASK_VERSION` special variable (#990, #1014 by @ja1code).
|
||||
- Fixed a bug where tasks were sometimes incorrectly marked as internal (#1007
|
||||
by @pd93).
|
||||
- Update to Go 1.20 (bump minimum version to 1.19) (#1010 by @pd93)
|
||||
- Added environment variable `FORCE_COLOR` support to force color output.
|
||||
Usefull for environments without TTY (#1003 by @automation-stack)
|
||||
|
||||
## v3.20.0 - 2023-01-14
|
||||
|
||||
- Improve behavior and performance of status checking when using the `timestamp`
|
||||
mode (#976, #977 by @aminya).
|
||||
- Performance optimizations were made for large Taskfiles (#982 by @pd93).
|
||||
- Add ability to configure options for the
|
||||
[`set`](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html)
|
||||
and
|
||||
[`shopt`](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html)
|
||||
builtins (#908, #929 by @pd93,
|
||||
[Documentation](http://taskfile.dev/usage/#set-and-shopt)).
|
||||
- Add new `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).
|
||||
|
||||
## v3.19.1 - 2022-12-31
|
||||
|
||||
- Small bug fix: closing `Taskfile.yml` once we're done reading it (#963, #964
|
||||
by @HeCorr).
|
||||
- Fixes a bug in v2 that caused a panic when using a `Taskfile_{{OS}}.yml` file
|
||||
(#961, #971 by @pd93).
|
||||
- Fixed a bug where watch intervals set in the Taskfile were not being respected
|
||||
(#969, #970 by @pd93)
|
||||
- Add `--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).
|
||||
|
||||
## v3.19.0 - 2022-12-05
|
||||
|
||||
- Installation via npm now supports [pnpm](https://pnpm.io/) as well
|
||||
([go-task/go-npm#2](https://github.com/go-task/go-npm/issues/2),
|
||||
[go-task/go-npm#3](https://github.com/go-task/go-npm/pull/3)).
|
||||
- It's now possible to run Taskfiles from subdirectories! A new
|
||||
`USER_WORKING_DIR` special variable was added to add even more flexibility for
|
||||
monorepos (#289, #920).
|
||||
- Add task-level `dotenv` support (#389, #904).
|
||||
- It's now possible to use global level variables on `includes` (#942, #943).
|
||||
- The website got a brand new
|
||||
[translation to Chinese](https://task-zh.readthedocs.io/zh_CN/latest/) by
|
||||
[@DeronW](https://github.com/DeronW). Thanks!
|
||||
|
||||
## v3.18.0 - 2022-11-12
|
||||
|
||||
- Show aliases on `task --list --silent` (`task --ls`). This means that aliases
|
||||
will be completed by the completion scripts (#919).
|
||||
- Tasks in the root Taskfile will now be displayed first in
|
||||
`--list`/`--list-all` output (#806, #890).
|
||||
- It's now possible to call a `default` task in an included Taskfile by using
|
||||
just the namespace. For example: `docs:default` is now automatically aliased
|
||||
to `docs` (#661, #815).
|
||||
|
||||
## v3.17.0 - 2022-10-14
|
||||
|
||||
- Add a "Did you mean ...?" suggestion when a task does not exits another one
|
||||
with a similar name is found (#867, #880).
|
||||
- Now YAML parse errors will print which Taskfile failed to parse (#885, #887).
|
||||
- Add ability to set `aliases` for tasks and namespaces (#268, #340, #879).
|
||||
- Improvements to Fish shell completion (#897).
|
||||
- Added ability to set a different watch interval by setting `interval: '500ms'`
|
||||
or using the `--interval=500ms` flag (#813, #865).
|
||||
- Add colored output to `--list`, `--list-all` and `--summary` flags (#845,
|
||||
#874).
|
||||
- Fix unexpected behavior where `label:` was being shown instead of the task
|
||||
name on `--list` (#603, #877).
|
||||
|
||||
## v3.16.0 - 2022-09-29
|
||||
|
||||
- Add `npm` as new installation method: `npm i -g @go-task/cli` (#870, #871,
|
||||
[npm package](https://www.npmjs.com/package/@go-task/cli)).
|
||||
- Add support to marking tasks and includes as internal, which will hide them
|
||||
from `--list` and `--list-all` (#818).
|
||||
|
||||
## v3.15.2 - 2022-09-08
|
||||
|
||||
- Fix error when using variable in `env:` introduced in the previous release
|
||||
(#858, #866).
|
||||
- Fix handling of `CLI_ARGS` (`--`) in Bash completion (#863).
|
||||
- On zsh completion, add ability to replace `--list-all` with `--list` as
|
||||
already possible on the Bash completion (#861).
|
||||
|
||||
## v3.15.0 - 2022-09-03
|
||||
|
||||
- Add new special variables `ROOT_DIR` and `TASKFILE_DIR`. This was a highly
|
||||
requested feature (#215, #857,
|
||||
[Documentation](https://taskfile.dev/api/#special-variables)).
|
||||
- Follow symlinks on `sources` (#826, #831).
|
||||
- Improvements and fixes to Bash completion (#835, #844).
|
||||
|
||||
## v3.14.1 - 2022-08-03
|
||||
|
||||
- Always resolve relative include paths relative to the including Taskfile
|
||||
(#822, #823).
|
||||
- Fix ZSH and PowerShell completions to consider all tasks instead of just the
|
||||
public ones (those with descriptions) (#803).
|
||||
|
||||
## v3.14.0 - 2022-07-08
|
||||
|
||||
- Add ability to override the `.task` directory location with the
|
||||
`TASK_TEMP_DIR` environment variable.
|
||||
- Allow to override Task colors using environment variables: `TASK_COLOR_RESET`,
|
||||
`TASK_COLOR_BLUE`, `TASK_COLOR_GREEN`, `TASK_COLOR_CYAN`, `TASK_COLOR_YELLOW`,
|
||||
`TASK_COLOR_MAGENTA` and `TASK_COLOR_RED` (#568, #792).
|
||||
- Fixed bug when using the `output: group` mode where STDOUT and STDERR were
|
||||
being print in separated blocks instead of in the right order (#779).
|
||||
- Starting on this release, ARM architecture binaries are been released to Snap
|
||||
as well (#795).
|
||||
- i386 binaries won't be available anymore on Snap because Ubuntu removed the
|
||||
support for this architecture.
|
||||
- Upgrade mvdan.cc/sh, which fixes a bug with associative arrays (#785,
|
||||
[mvdan/sh#884](https://github.com/mvdan/sh/issues/884),
|
||||
[mvdan/sh#893](https://github.com/mvdan/sh/pull/893)).
|
||||
|
||||
## v3.13.0 - 2022-06-13
|
||||
|
||||
- Added `-n` as an alias to `--dry` (#776, #777).
|
||||
- Fix behavior of interrupt (SIGINT, SIGTERM) signals. Task will now give time
|
||||
for the processes running to do cleanup work (#458, #479, #728, #769).
|
||||
- Add new `--exit-code` (`-x`) flag that will pass-through the exit form the
|
||||
command being ran (#755).
|
||||
|
||||
## v3.12.1 - 2022-05-10
|
||||
|
||||
- Fixed bug where, on Windows, variables were ending with `\r` because we were
|
||||
only removing the final `\n` but not `\r\n` (#717).
|
||||
|
||||
## v3.12.0 - 2022-03-31
|
||||
|
||||
- The `--list` and `--list-all` flags can now be combined with the `--silent`
|
||||
flag to print the task names only, without their description (#691).
|
||||
- Added support for multi-level inclusion of Taskfiles. This means that included
|
||||
Taskfiles can also include other Taskfiles. Before this was limited to one
|
||||
level (#390, #623, #656).
|
||||
- Add ability to specify vars when including a Taskfile.
|
||||
[Check out the documentation](https://taskfile.dev/#/usage?id=vars-of-included-taskfiles)
|
||||
for more information (#677).
|
||||
|
||||
## v3.11.0 - 2022-02-19
|
||||
|
||||
- Task now supports printing begin and end messages when using the `group`
|
||||
output mode, useful for grouping tasks in CI systems.
|
||||
[Check out the documentation](http://taskfile.dev/#/usage?id=output-syntax)
|
||||
for more information (#647, #651).
|
||||
- Add `Taskfile.dist.yml` and `Taskfile.dist.yaml` to the supported file name
|
||||
list.
|
||||
[Check out the documentation](https://taskfile.dev/#/usage?id=supported-file-names)
|
||||
for more information (#498, #666).
|
||||
|
||||
## v3.10.0 - 2022-01-04
|
||||
|
||||
- A new `--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).
|
||||
- It's now possible to schedule cleanup commands to run once a task finishes
|
||||
with the `defer:` keyword
|
||||
([Documentation](https://taskfile.dev/#/usage?id=doing-task-cleanup-with-defer),
|
||||
#475, #626).
|
||||
- Remove long deprecated and undocumented `$` variable prefix and `^` command
|
||||
prefix (#642, #644, #645).
|
||||
- Add support for `.yaml` extension (as an alternative to `.yml`). This was
|
||||
requested multiple times throughout the years. Enjoy! (#183, #184, #369, #584,
|
||||
#621).
|
||||
- Fixed error when computing a variable when the task directory do not exist yet
|
||||
(#481, #579).
|
||||
|
||||
## v3.9.2 - 2021-12-02
|
||||
|
||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains a fix a for a
|
||||
important regression on Windows (#619,
|
||||
[mvdan/sh#768](https://github.com/mvdan/sh/issues/768),
|
||||
[mvdan/sh#769](https://github.com/mvdan/sh/pull/769)).
|
||||
|
||||
## v3.9.1 - 2021-11-28
|
||||
|
||||
- Add logging in verbose mode for when a task starts and finishes (#533, #588).
|
||||
- Fix an issue with preconditions and context errors (#597, #598).
|
||||
- Quote each `{{.CLI_ARGS}}` argument to prevent one with spaces to become many
|
||||
(#613).
|
||||
- Fix nil pointer when `cmd:` was left empty (#612, #614).
|
||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains two relevant
|
||||
fixes:
|
||||
- Fix quote of empty strings in `shellQuote` (#609,
|
||||
[mvdan/sh#763](https://github.com/mvdan/sh/issues/763)).
|
||||
- Fix issue of wrong environment variable being picked when there's another
|
||||
very similar one (#586,
|
||||
[mvdan/sh#745](https://github.com/mvdan/sh/pull/745)).
|
||||
- Install shell completions automatically when installing via Homebrew (#264,
|
||||
#592,
|
||||
[go-task/homebrew-tap#2](https://github.com/go-task/homebrew-tap/pull/2)).
|
||||
|
||||
## v3.9.0 - 2021-10-02
|
||||
|
||||
- A new `shellQuote` function was added to the template system
|
||||
(`{{shellQuote "a string"}}`) to ensure a string is safe for use in shell
|
||||
([mvdan/sh#727](https://github.com/mvdan/sh/pull/727),
|
||||
[mvdan/sh#737](https://github.com/mvdan/sh/pull/737),
|
||||
[Documentation](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote))
|
||||
- In this version [mvdan.cc/sh](https://github.com/mvdan/sh) was upgraded with
|
||||
some small fixes and features
|
||||
- The `read -p` flag is now supported (#314,
|
||||
[mvdan/sh#551](https://github.com/mvdan/sh/issues/551),
|
||||
[mvdan/sh#772](https://github.com/mvdan/sh/pull/722))
|
||||
- The `pwd -P` and `pwd -L` flags are now supported (#553,
|
||||
[mvdan/sh#724](https://github.com/mvdan/sh/issues/724),
|
||||
[mvdan/sh#728](https://github.com/mvdan/sh/pull/728))
|
||||
- The `$GID` environment variable is now correctly being set (#561,
|
||||
[mvdan/sh#723](https://github.com/mvdan/sh/pull/723))
|
||||
|
||||
## v3.8.0 - 2021-09-26
|
||||
|
||||
- Add `interactive: true` setting to improve support for interactive CLI apps
|
||||
(#217, #563).
|
||||
- Fix some `nil` errors (#534, #573).
|
||||
- Add ability to declare an included Taskfile as optional (#519, #552).
|
||||
- Add support for including Taskfiles in the home directory by using `~` (#539,
|
||||
#557).
|
||||
|
||||
## v3.7.3 - 2021-09-04
|
||||
|
||||
- Add official support to Apple M1 (#564, #567).
|
||||
- Our [official Homebrew tap](https://github.com/go-task/homebrew-tap) will
|
||||
support more platforms, including Apple M1
|
||||
|
||||
## v3.7.0 - 2021-07-31
|
||||
|
||||
- Add `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).
|
||||
|
||||
## v3.6.0 - 2021-07-10
|
||||
|
||||
- Allow using both `sources:` and `status:` in the same task (#411, #427, #477).
|
||||
- Small optimization and bug fix: don't compute variables if not needed for
|
||||
`dotenv:` (#517).
|
||||
|
||||
## v3.5.0 - 2021-07-04
|
||||
|
||||
- Add support for interpolation in `dotenv:` (#433, #434, #453).
|
||||
|
||||
## v3.4.3 - 2021-05-30
|
||||
|
||||
- Add support for the `NO_COLOR` environment variable. (#459,
|
||||
[fatih/color#137](https://github.com/fatih/color/pull/137)).
|
||||
- Fix bug where sources were not considering the right directory in `--watch`
|
||||
mode (#484, #485).
|
||||
|
||||
## v3.4.2 - 2021-04-23
|
||||
|
||||
- On watch, report which file failed to read (#472).
|
||||
- Do not try to catch SIGKILL signal, which are not actually possible (#476).
|
||||
- Improve version reporting when building Task from source using Go Modules
|
||||
(#462, #473).
|
||||
|
||||
## v3.4.1 - 2021-04-17
|
||||
|
||||
- Improve error reporting when parsing YAML: in some situations where you would
|
||||
just see an generic error, you'll now see the actual error with more detail:
|
||||
the YAML line the failed to parse, for example (#467).
|
||||
- A JSON Schema was published [here](https://json.schemastore.org/taskfile.json)
|
||||
and is automatically being used by some editors like Visual Studio Code
|
||||
(#135).
|
||||
- Print task name before the command in the log output (#398).
|
||||
|
||||
## v3.3.0 - 2021-03-20
|
||||
|
||||
- Add support for delegating CLI arguments to commands with `--` and a special
|
||||
`CLI_ARGS` variable (#327).
|
||||
- Add a `--concurrency` (alias `-C`) flag, to limit the number of tasks that run
|
||||
concurrently. This is useful for heavy workloads. (#345).
|
||||
|
||||
## v3.2.2 - 2021-01-12
|
||||
|
||||
- Improve performance of `--list` and `--summary` by skipping running shell
|
||||
variables for these flags (#332).
|
||||
- Fixed a bug where an environment in a Taskfile was not always overridable by
|
||||
the system environment (#425).
|
||||
- Fixed environment from .env files not being available as variables (#379).
|
||||
- The install script is now working for ARM platforms (#428).
|
||||
|
||||
## v3.2.1 - 2021-01-09
|
||||
|
||||
- Fixed some bugs and regressions regarding dynamic variables and directories
|
||||
(#426).
|
||||
- The [slim-sprig](https://github.com/go-task/slim-sprig) package was updated
|
||||
with the upstream [sprig](https://github.com/Masterminds/sprig).
|
||||
|
||||
## v3.2.0 - 2021-01-07
|
||||
|
||||
- Fix the `.task` directory being created in the task directory instead of the
|
||||
Taskfile directory (#247).
|
||||
- Fix a bug where dynamic variables (those declared with `sh:`) were not running
|
||||
in the task directory when the task has a custom dir or it was in an included
|
||||
Taskfile (#384).
|
||||
- The watch feature (via the `--watch` flag) got a few different bug fixes and
|
||||
should be more stable now (#423, #365).
|
||||
|
||||
## v3.1.0 - 2021-01-03
|
||||
|
||||
- Fix a bug when the checksum up-to-date resolution is used by a task with a
|
||||
custom `label:` attribute (#412).
|
||||
- Starting from this release, we're releasing official ARMv6 and ARM64 binaries
|
||||
for Linux (#375, #418).
|
||||
- Task now respects the order of declaration of included Taskfiles when
|
||||
evaluating variables declaring by them (#393).
|
||||
- `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).
|
||||
|
||||
## v3.0.1 - 2020-12-26
|
||||
|
||||
- Allow use as a library by moving the required packages out of the `internal`
|
||||
directory (#358).
|
||||
- Do not error if a specified dotenv file does not exist (#378, #385).
|
||||
- Fix panic when you have empty tasks in your Taskfile (#338, #362).
|
||||
|
||||
## v3.0.0 - 2020-08-16
|
||||
|
||||
- On `v3`, all CLI variables will be considered global variables (#336, #341)
|
||||
- Add support to `.env` like files (#324, #356).
|
||||
- Add `label:` to task so you can override the task name in the logs
|
||||
([#321](https://github.com/go-task/task/issues/321]), #337).
|
||||
- Refactor how variables work on version 3 (#311).
|
||||
- Disallow `expansions` on v3 since it has no effect.
|
||||
- `Taskvars.yml` is not automatically included anymore.
|
||||
- `Taskfile_{{OS}}.yml` is not automatically included anymore.
|
||||
- Allow interpolation on `includes`, so you can manually include a Taskfile
|
||||
based on operation system, for example.
|
||||
- Expose `.TASK` variable in templates with the task name (#252).
|
||||
- Implement short task syntax (#194, #240).
|
||||
- Added option to make included Taskfile run commands on its own directory
|
||||
(#260, #144)
|
||||
- Taskfiles in version 1 are not supported anymore (#237).
|
||||
- Added global `method:` option. With this option, you can set a default method
|
||||
to all tasks in a Taskfile (#246).
|
||||
- Changed default method from `timestamp` to `checksum` (#246).
|
||||
- New magic variables are now available when using `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).
|
||||
- We're now using [slim-sprig](https://github.com/go-task/slim-sprig) instead of
|
||||
[sprig](https://github.com/Masterminds/sprig), which allowed a file size
|
||||
reduction of about 22% (#219).
|
||||
- We now use some colors on Task output to better distinguish message types -
|
||||
commands are green, errors are red, etc (#207).
|
||||
|
||||
## v2.8.1 - 2020-05-20
|
||||
|
||||
- Fix error code for the `--help` flag (#300, #330).
|
||||
- Print version to stdout instead of stderr (#299, #329).
|
||||
- Supress `context` errors when using the `--watch` flag (#313, #317).
|
||||
- Support templating on description (#276, #283).
|
||||
|
||||
## v2.8.0 - 2019-12-07
|
||||
|
||||
- Add `--parallel` flag (alias `-p`) to run tasks given by the command line in
|
||||
parallel (#266).
|
||||
- Fixed bug where calling the `task` CLI only informing global vars would not
|
||||
execute the `default` task.
|
||||
- Add hability to silent all tasks by adding `silent: true` a the root of the
|
||||
Taskfile.
|
||||
|
||||
## v2.7.1 - 2019-11-10
|
||||
|
||||
- Fix error being raised when `exit 0` was called (#251).
|
||||
|
||||
## v2.7.0 - 2019-09-22
|
||||
|
||||
- Fixed panic bug when assigning a global variable (#229, #243).
|
||||
- A task with `method: checksum` will now re-run if generated files are deleted
|
||||
(#228, #238).
|
||||
|
||||
## v2.6.0 - 2019-07-21
|
||||
|
||||
- Fixed some bugs regarding minor version checks on `version:`.
|
||||
- Add `preconditions:` to task (#205).
|
||||
- Create directory informed on `dir:` if it doesn't exist (#209, #211).
|
||||
- We now have a `--taskfile` flag (alias `-t`), which can be used to run another
|
||||
Taskfile (other than the default `Taskfile.yml`) (#221).
|
||||
- It's now possible to install Task using Homebrew on Linux
|
||||
([go-task/homebrew-tap#1](https://github.com/go-task/homebrew-tap/pull/1)).
|
||||
|
||||
## v2.5.2 - 2019-05-11
|
||||
|
||||
- Reverted YAML upgrade due issues with CRLF on Windows (#201,
|
||||
[go-yaml/yaml#450](https://github.com/go-yaml/yaml/issues/450)).
|
||||
- Allow setting global variables through the CLI (#192).
|
||||
|
||||
## 2.5.1 - 2019-04-27
|
||||
|
||||
- Fixed some issues with interactive command line tools, where sometimes
|
||||
the output were not being shown, and similar issues
|
||||
([#114](https://github.com/go-task/task/issues/114), [#190](https://github.com/go-task/task/issues/190), [#200](https://github.com/go-task/task/pull/200)).
|
||||
- Fixed some issues with interactive command line tools, where sometimes the
|
||||
output were not being shown, and similar issues (#114, #190, #200).
|
||||
- Upgraded [go-yaml/yaml](https://github.com/go-yaml/yaml) from v2 to v3.
|
||||
|
||||
## v2.5.0 - 2019-03-16
|
||||
@@ -13,55 +503,56 @@
|
||||
While stuff is being redirected, we strongly recommend to everyone that use
|
||||
[this install script](https://taskfile.dev/#/installation?id=install-script)
|
||||
to use the new taskfile.dev domain on scripts from now on.
|
||||
- Fixed to the ZSH completion
|
||||
([#182](https://github.com/go-task/task/pull/182)).
|
||||
- Add [`--summary` flag along with `summary:` task attribute](https://taskfile.org/#/usage?id=display-summary-of-task)
|
||||
([#180](https://github.com/go-task/task/pull/180)).
|
||||
- Fixed to the ZSH completion (#182).
|
||||
- Add
|
||||
[`--summary` flag along with `summary:` task attribute](https://taskfile.org/#/usage?id=display-summary-of-task)
|
||||
(#180).
|
||||
|
||||
## v2.4.0 - 2019-02-21
|
||||
|
||||
- Allow calling a task of the root Taskfile from an included Taskfile
|
||||
by prefixing it with `:`
|
||||
([#161](https://github.com/go-task/task/issues/161), [#172](https://github.com/go-task/task/issues/172)),
|
||||
- Add flag to override the `output` option
|
||||
([#173](https://github.com/go-task/task/pull/173));
|
||||
- Allow calling a task of the root Taskfile from an included Taskfile by
|
||||
prefixing it with `:` (#161, #172).
|
||||
- Add flag to override the `output` option (#173).
|
||||
- Fix bug where Task was persisting the new checksum on the disk when the Dry
|
||||
Mode is enabled
|
||||
([#166](https://github.com/go-task/task/issues/166));
|
||||
- Fix file timestamp issue when the file name has spaces
|
||||
([#176](https://github.com/go-task/task/issues/176));
|
||||
- Mitigating path expanding issues on Windows
|
||||
([#170](https://github.com/go-task/task/pull/170)).
|
||||
Mode is enabled (#166).
|
||||
- Fix file timestamp issue when the file name has spaces (#176).
|
||||
- Mitigating path expanding issues on Windows (#170).
|
||||
|
||||
## v2.3.0 - 2019-01-02
|
||||
|
||||
- On Windows, Task can now be installed using [Scoop](https://scoop.sh/)
|
||||
([#152](https://github.com/go-task/task/pull/152));
|
||||
- Fixed issue with file/directory globing
|
||||
([#153](https://github.com/go-task/task/issues/153));
|
||||
- Added ability to globally set environment variables
|
||||
(
|
||||
[#138](https://github.com/go-task/task/pull/138),
|
||||
[#159](https://github.com/go-task/task/pull/159)
|
||||
).
|
||||
- On Windows, Task can now be installed using [Scoop](https://scoop.sh/) (#152).
|
||||
- Fixed issue with file/directory globing (#153).
|
||||
- Added ability to globally set environment variables (#138, #159).
|
||||
|
||||
## v2.2.1 - 2018-12-09
|
||||
|
||||
- This repository now uses Go Modules (#143). We'll still keep the `vendor` directory in sync for some time, though;
|
||||
- Fixing a bug when the Taskfile has no tasks but includes another Taskfile (#150);
|
||||
- Fix a bug when calling another task or a dependency in an included Taskfile (#151).
|
||||
- This repository now uses Go Modules (#143). We'll still keep the `vendor`
|
||||
directory in sync for some time, though;
|
||||
- Fixing a bug when the Taskfile has no tasks but includes another Taskfile
|
||||
(#150);
|
||||
- Fix a bug when calling another task or a dependency in an included Taskfile
|
||||
(#151).
|
||||
|
||||
## v2.2.0 - 2018-10-25
|
||||
|
||||
- Added support for [including other Taskfiles](https://taskfile.org/#/usage?id=including-other-taskfiles) (#98)
|
||||
- This should be considered experimental. For now, only including local files is supported, but support for including remote Taskfiles is being discussed. If you have any feedback, please comment on #98.
|
||||
- Added support for
|
||||
[including other Taskfiles](https://taskfile.org/#/usage?id=including-other-taskfiles)
|
||||
(#98)
|
||||
- This should be considered experimental. For now, only including local files
|
||||
is supported, but support for including remote Taskfiles is being discussed.
|
||||
If you have any feedback, please comment on #98.
|
||||
- Task now have a dedicated documentation site: https://taskfile.org
|
||||
- Thanks to [Docsify](https://docsify.js.org/) for making this pretty easy. To check the source code, just take a look at the [docs](https://github.com/go-task/task/tree/master/docs) directory of this repository. Contributions to the documentation is really appreciated.
|
||||
- Thanks to [Docsify](https://docsify.js.org/) for making this pretty easy. To
|
||||
check the source code, just take a look at the
|
||||
[docs](https://github.com/go-task/task/tree/main/docs) directory of this
|
||||
repository. Contributions to the documentation is really appreciated.
|
||||
|
||||
## v2.1.1 - 2018-09-17
|
||||
|
||||
- Fix suggestion to use `task --init` not being shown anymore (when a `Taskfile.yml` is not found)
|
||||
- Fix error when using checksum method and no file exists for a source glob (#131)
|
||||
- Fix suggestion to use `task --init` not being shown anymore (when a
|
||||
`Taskfile.yml` is not found)
|
||||
- Fix error when using checksum method and no file exists for a source glob
|
||||
(#131)
|
||||
- Fix signal handling when the `--watch` flag is given (#132)
|
||||
|
||||
## v2.1.0 - 2018-08-19
|
||||
@@ -74,7 +565,8 @@
|
||||
- Expand environment variables on "dir", "sources" and "generates" (#116)
|
||||
- Fix YAML merging syntax (#112)
|
||||
- Add ZSH completion (#111)
|
||||
- Implement new `output` option. Please check out the [documentation](https://github.com/go-task/task#output-syntax)
|
||||
- Implement new `output` option. Please check out the
|
||||
[documentation](https://github.com/go-task/task#output-syntax)
|
||||
|
||||
## v2.0.2 - 2018-05-01
|
||||
|
||||
@@ -88,11 +580,14 @@
|
||||
|
||||
Version 2.0.0 is here, with a new Taskfile format.
|
||||
|
||||
Please, make sure to read the [Taskfile versions](https://github.com/go-task/task/blob/master/TASKFILE_VERSIONS.md) document, since it describes in depth what changed for this version.
|
||||
Please, make sure to read the
|
||||
[Taskfile versions](https://github.com/go-task/task/blob/main/TASKFILE_VERSIONS.md)
|
||||
document, since it describes in depth what changed for this version.
|
||||
|
||||
* New Taskfile version 2 (https://github.com/go-task/task/issues/77)
|
||||
* Possibility to have global variables in the `Taskfile.yml` instead of `Taskvars.yml` (https://github.com/go-task/task/issues/66)
|
||||
* Small improvements and fixes
|
||||
- New Taskfile version 2 (#77)
|
||||
- Possibility to have global variables in the `Taskfile.yml` instead of
|
||||
`Taskvars.yml` (#66)
|
||||
- Small improvements and fixes
|
||||
|
||||
## v1.4.4 - 2017-11-19
|
||||
|
||||
@@ -112,7 +607,8 @@ Please, make sure to read the [Taskfile versions](https://github.com/go-task/tas
|
||||
- Added suport for multiline variables from sh (#64)
|
||||
- Fixes env: remove square braces and evaluate shell (#62)
|
||||
- Watch: change watch library and few fixes and improvements
|
||||
- When use watching, cancel and restart long running process on file change (#59 and #60)
|
||||
- When use watching, cancel and restart long running process on file change (#59
|
||||
and #60)
|
||||
|
||||
## v1.4.2 - 2017-07-30
|
||||
|
||||
@@ -126,7 +622,8 @@ Please, make sure to read the [Taskfile versions](https://github.com/go-task/tas
|
||||
- Allow use of YAML for dynamic variables instead of $ prefix
|
||||
- `VAR: {sh: echo Hello}` instead of `VAR: $echo Hello`
|
||||
- Add `--list` (or `-l`) flag to print existing tasks
|
||||
- OS specific Taskvars file (e.g. `Taskvars_windows.yml`, `Taskvars_linux.yml`, etc)
|
||||
- OS specific Taskvars file (e.g. `Taskvars_windows.yml`, `Taskvars_linux.yml`,
|
||||
etc)
|
||||
- Consider task up-to-date on equal timestamps (#49)
|
||||
- Allow absolute path in generates section (#48)
|
||||
- Bugfix: allow templating when calling deps (#42)
|
||||
@@ -154,11 +651,13 @@ Please, make sure to read the [Taskfile versions](https://github.com/go-task/tas
|
||||
|
||||
- Migrate from os/exec.Cmd to a native Go sh/bash interpreter
|
||||
- This is a potentially breaking change if you use Windows.
|
||||
- Now, `cmd` is not used anymore on Windows. Always use Bash-like syntax for your commands, even on Windows.
|
||||
- Now, `cmd` is not used anymore on Windows. Always use Bash-like syntax for
|
||||
your commands, even on Windows.
|
||||
- Add "ToSlash" and "FromSlash" to template functions
|
||||
- Use functions defined on github.com/Masterminds/sprig
|
||||
- Do not redirect stdin while running variables commands
|
||||
- Using `context` and `errgroup` packages (this will make other tasks to be cancelled, if one returned an error)
|
||||
- Using `context` and `errgroup` packages (this will make other tasks to be
|
||||
cancelled, if one returned an error)
|
||||
|
||||
## v1.2.0 - 2017-04-02
|
||||
|
||||
|
||||
35
README.md
35
README.md
@@ -1,22 +1,29 @@
|
||||
[](https://travis-ci.org/go-task/task)
|
||||
<div align="center">
|
||||
<a href="https://taskfile.dev">
|
||||
<img src="docs/static/img/logo.svg" width="200px" height="200px" />
|
||||
</a>
|
||||
|
||||
# Task
|
||||
<h1>Task</h1>
|
||||
|
||||
Task is a task runner / build tool that aims to be simpler and easier to use
|
||||
than, for example, [GNU Make](https://www.gnu.org/software/make/).
|
||||
<p>
|
||||
Task is a task runner / build tool that aims to be simpler and easier to use than, for example, <a href="https://www.gnu.org/software/make/">GNU Make<a>.
|
||||
</p>
|
||||
|
||||
See [taskfile.dev](https://taskfile.dev) for documentation.
|
||||
<p>
|
||||
<a href="https://taskfile.dev/installation/">Installation</a> | <a href="https://taskfile.dev/usage/">Documentation</a> | <a href="https://twitter.com/taskfiledev">Twitter</a> | <a href="https://fosstodon.org/@task">Mastodon</a> | <a href="https://discord.gg/6TY36E39UK">Discord</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
---
|
||||
## Gold Sponsors
|
||||
|
||||
## Sponsors
|
||||
<div align="center">
|
||||
|
||||
[](https://opencollective.com/task)
|
||||
| [Appwrite][appwrite] |
|
||||
| ------------------------------------------------------ |
|
||||
| [][appwrite] |
|
||||
|
||||
## Backers
|
||||
</div>
|
||||
|
||||
[](https://opencollective.com/task)
|
||||
|
||||
## Contributors
|
||||
|
||||
[](https://github.com/go-task/task/graphs/contributors)
|
||||
<!-- prettier-ignore-start -->
|
||||
[appwrite]: https://appwrite.io/?utm_source=task_github&utm_medium=social&utm_campaign=task_oss_fund
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
131
Taskfile.yml
131
Taskfile.yml
@@ -1,88 +1,137 @@
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
docs: ./docs
|
||||
docs:
|
||||
aliases: [d]
|
||||
taskfile: ./docs
|
||||
dir: ./docs
|
||||
|
||||
vars:
|
||||
GIT_COMMIT:
|
||||
sh: git log -n 1 --format=%h
|
||||
BIN: "{{.ROOT_DIR}}/bin"
|
||||
|
||||
GO_PACKAGES:
|
||||
sh: go list ./...
|
||||
env:
|
||||
CGO_ENABLED: '0'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- task: lint
|
||||
- task: test
|
||||
|
||||
install:
|
||||
desc: Installs Task
|
||||
aliases: [i]
|
||||
sources:
|
||||
- './**/*.go'
|
||||
cmds:
|
||||
- go install -v -ldflags="-w -s -X main.version={{.GIT_COMMIT}}" ./cmd/task
|
||||
- go install -v ./cmd/task
|
||||
|
||||
generate:
|
||||
desc: Runs Go generate to create mocks
|
||||
aliases: [gen, g]
|
||||
deps: [install:mockery]
|
||||
sources:
|
||||
- "internal/fingerprint/checker.go"
|
||||
generates:
|
||||
- "internal/mocks/*.go"
|
||||
cmds:
|
||||
- "{{.BIN}}/mockery --dir ./internal/fingerprint --name SourcesCheckable"
|
||||
- "{{.BIN}}/mockery --dir ./internal/fingerprint --name StatusCheckable"
|
||||
|
||||
install:mockery:
|
||||
desc: Installs mockgen; a tool to generate mock files
|
||||
vars:
|
||||
MOCKERY_VERSION: v2.24.0
|
||||
env:
|
||||
CGO_ENABLED: '0'
|
||||
|
||||
dl-deps:
|
||||
desc: Downloads cli dependencies
|
||||
GOBIN: "{{.BIN}}"
|
||||
status:
|
||||
- go version -m {{.BIN}}/mockery | grep github.com/vektra/mockery | grep {{.MOCKERY_VERSION}}
|
||||
cmds:
|
||||
- task: go-get
|
||||
vars: {REPO: golang.org/x/lint/golint}
|
||||
- task: go-get
|
||||
vars: {REPO: github.com/goreleaser/goreleaser}
|
||||
- task: go-get
|
||||
vars: {REPO: github.com/goreleaser/godownloader}
|
||||
- go install github.com/vektra/mockery/v2@{{.MOCKERY_VERSION}}
|
||||
|
||||
vendor:
|
||||
desc: Sync vendor/ directory according to go.mod file
|
||||
mod:
|
||||
desc: Downloads and tidy Go modules
|
||||
cmds:
|
||||
- go mod vendor
|
||||
|
||||
update-deps:
|
||||
desc: Updates dependencies
|
||||
cmds:
|
||||
- dep ensure
|
||||
- dep ensure -update
|
||||
- go mod download
|
||||
- go mod tidy
|
||||
|
||||
clean:
|
||||
desc: Cleans temp files and folders
|
||||
cmds:
|
||||
- rm -rf dist/
|
||||
- rm -rf tmp/
|
||||
|
||||
lint:
|
||||
desc: Runs golint
|
||||
desc: Runs golangci-lint
|
||||
aliases: [l]
|
||||
sources:
|
||||
- './**/*.go'
|
||||
- .golangci.yml
|
||||
cmds:
|
||||
- golint {{catLines .GO_PACKAGES}}
|
||||
- golangci-lint run
|
||||
|
||||
lint:fix:
|
||||
desc: Runs golangci-lint and fixes any issues
|
||||
sources:
|
||||
- './**/*.go'
|
||||
- .golangci.yml
|
||||
cmds:
|
||||
- golangci-lint run --fix
|
||||
|
||||
sleepit:build:
|
||||
desc: Builds the sleepit test helper
|
||||
sources:
|
||||
- ./cmd/sleepit/**/*.go
|
||||
generates:
|
||||
- "{{.BIN}}/sleepit"
|
||||
cmds:
|
||||
- go build -o {{.BIN}}/sleepit{{exeExt}} ./cmd/sleepit
|
||||
|
||||
sleepit:run:
|
||||
desc: Builds the sleepit test helper
|
||||
deps: [sleepit:build]
|
||||
cmds:
|
||||
- "{{.BIN}}/sleepit {{.CLI_ARGS}}"
|
||||
silent: true
|
||||
|
||||
test:
|
||||
desc: Runs test suite
|
||||
aliases: [t]
|
||||
deps: [install]
|
||||
cmds:
|
||||
- go test {{catLines .GO_PACKAGES}}
|
||||
vars:
|
||||
GO_PACKAGES:
|
||||
sh: go list ./...
|
||||
|
||||
test:all:
|
||||
desc: Runs test suite with signals and watch tests included
|
||||
deps: [install, sleepit:build]
|
||||
cmds:
|
||||
- go test {{catLines .GO_PACKAGES}} -tags 'signals watch'
|
||||
vars:
|
||||
GO_PACKAGES:
|
||||
sh: go list ./...
|
||||
|
||||
test-release:
|
||||
desc: Tests release process without publishing
|
||||
cmds:
|
||||
- goreleaser --snapshot --rm-dist
|
||||
|
||||
generate-install-script:
|
||||
desc: Generate install script using https://github.com/goreleaser/godownloader
|
||||
release:
|
||||
desc: Prepare the project for a new release
|
||||
cmds:
|
||||
- godownloader --repo go-task/task -o install-task.sh
|
||||
- cp ./install-task.sh ./docs/install.sh
|
||||
- go run ./cmd/release {{.CLI_ARGS}}
|
||||
|
||||
ci:
|
||||
npm:publish:
|
||||
desc: Publish release to npm
|
||||
cmds:
|
||||
- task: go-get
|
||||
vars: {REPO: golang.org/x/lint/golint}
|
||||
- task: lint
|
||||
- task: test
|
||||
|
||||
go-get:
|
||||
cmds:
|
||||
- go get -u {{.REPO}}
|
||||
- npm publish --access=public
|
||||
|
||||
packages:
|
||||
cmds:
|
||||
- echo '{{.GO_PACKAGES}}'
|
||||
vars:
|
||||
GO_PACKAGES:
|
||||
sh: go list ./...
|
||||
silent: true
|
||||
|
||||
64
args/args.go
Normal file
64
args/args.go
Normal file
@@ -0,0 +1,64 @@
|
||||
package args
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-task/task/v3/taskfile"
|
||||
)
|
||||
|
||||
// ParseV3 parses command line argument: tasks and global variables
|
||||
func ParseV3(args ...string) ([]taskfile.Call, *taskfile.Vars) {
|
||||
var calls []taskfile.Call
|
||||
globals := &taskfile.Vars{}
|
||||
|
||||
for _, arg := range args {
|
||||
if !strings.Contains(arg, "=") {
|
||||
calls = append(calls, taskfile.Call{Task: arg})
|
||||
continue
|
||||
}
|
||||
|
||||
name, value := splitVar(arg)
|
||||
globals.Set(name, taskfile.Var{Static: value})
|
||||
}
|
||||
|
||||
if len(calls) == 0 {
|
||||
calls = append(calls, taskfile.Call{Task: "default"})
|
||||
}
|
||||
|
||||
return calls, globals
|
||||
}
|
||||
|
||||
// ParseV2 parses command line argument: tasks and vars of each task
|
||||
func ParseV2(args ...string) ([]taskfile.Call, *taskfile.Vars) {
|
||||
var calls []taskfile.Call
|
||||
globals := &taskfile.Vars{}
|
||||
|
||||
for _, arg := range args {
|
||||
if !strings.Contains(arg, "=") {
|
||||
calls = append(calls, taskfile.Call{Task: arg})
|
||||
continue
|
||||
}
|
||||
|
||||
if len(calls) < 1 {
|
||||
name, value := splitVar(arg)
|
||||
globals.Set(name, taskfile.Var{Static: value})
|
||||
} else {
|
||||
if calls[len(calls)-1].Vars == nil {
|
||||
calls[len(calls)-1].Vars = &taskfile.Vars{}
|
||||
}
|
||||
name, value := splitVar(arg)
|
||||
calls[len(calls)-1].Vars.Set(name, taskfile.Var{Static: value})
|
||||
}
|
||||
}
|
||||
|
||||
if len(calls) == 0 {
|
||||
calls = append(calls, taskfile.Call{Task: "default"})
|
||||
}
|
||||
|
||||
return calls, globals
|
||||
}
|
||||
|
||||
func splitVar(s string) (string, string) {
|
||||
pair := strings.SplitN(s, "=", 2)
|
||||
return pair[0], pair[1]
|
||||
}
|
||||
228
args/args_test.go
Normal file
228
args/args_test.go
Normal file
@@ -0,0 +1,228 @@
|
||||
package args_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/go-task/task/v3/args"
|
||||
"github.com/go-task/task/v3/internal/orderedmap"
|
||||
"github.com/go-task/task/v3/taskfile"
|
||||
)
|
||||
|
||||
func TestArgsV3(t *testing.T) {
|
||||
tests := []struct {
|
||||
Args []string
|
||||
ExpectedCalls []taskfile.Call
|
||||
ExpectedGlobals *taskfile.Vars
|
||||
}{
|
||||
{
|
||||
Args: []string{"task-a", "task-b", "task-c"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "task-a"},
|
||||
{Task: "task-b"},
|
||||
{Task: "task-c"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"task-a", "FOO=bar", "task-b", "task-c", "BAR=baz", "BAZ=foo"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "task-a"},
|
||||
{Task: "task-b"},
|
||||
{Task: "task-c"},
|
||||
},
|
||||
ExpectedGlobals: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"FOO": {Static: "bar"},
|
||||
"BAR": {Static: "baz"},
|
||||
"BAZ": {Static: "foo"},
|
||||
},
|
||||
[]string{"FOO", "BAR", "BAZ"},
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"task-a", "CONTENT=with some spaces"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "task-a"},
|
||||
},
|
||||
ExpectedGlobals: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"CONTENT": {Static: "with some spaces"},
|
||||
},
|
||||
[]string{"CONTENT"},
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"FOO=bar", "task-a", "task-b"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "task-a"},
|
||||
{Task: "task-b"},
|
||||
},
|
||||
ExpectedGlobals: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"FOO": {Static: "bar"},
|
||||
},
|
||||
[]string{"FOO"},
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: nil,
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "default"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "default"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"FOO=bar", "BAR=baz"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "default"},
|
||||
},
|
||||
ExpectedGlobals: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"FOO": {Static: "bar"},
|
||||
"BAR": {Static: "baz"},
|
||||
},
|
||||
[]string{"FOO", "BAR"},
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for i, test := range tests {
|
||||
t.Run(fmt.Sprintf("TestArgs%d", i+1), func(t *testing.T) {
|
||||
calls, globals := args.ParseV3(test.Args...)
|
||||
assert.Equal(t, test.ExpectedCalls, calls)
|
||||
if test.ExpectedGlobals.Len() > 0 || globals.Len() > 0 {
|
||||
assert.Equal(t, test.ExpectedGlobals.Keys(), globals.Keys())
|
||||
assert.Equal(t, test.ExpectedGlobals.Values(), globals.Values())
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestArgsV2(t *testing.T) {
|
||||
tests := []struct {
|
||||
Args []string
|
||||
ExpectedCalls []taskfile.Call
|
||||
ExpectedGlobals *taskfile.Vars
|
||||
}{
|
||||
{
|
||||
Args: []string{"task-a", "task-b", "task-c"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "task-a"},
|
||||
{Task: "task-b"},
|
||||
{Task: "task-c"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"task-a", "FOO=bar", "task-b", "task-c", "BAR=baz", "BAZ=foo"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{
|
||||
Task: "task-a",
|
||||
Vars: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"FOO": {Static: "bar"},
|
||||
},
|
||||
[]string{"FOO"},
|
||||
),
|
||||
},
|
||||
},
|
||||
{Task: "task-b"},
|
||||
{
|
||||
Task: "task-c",
|
||||
Vars: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"BAR": {Static: "baz"},
|
||||
"BAZ": {Static: "foo"},
|
||||
},
|
||||
[]string{"BAR", "BAZ"},
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"task-a", "CONTENT=with some spaces"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{
|
||||
Task: "task-a",
|
||||
Vars: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"CONTENT": {Static: "with some spaces"},
|
||||
},
|
||||
[]string{"CONTENT"},
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"FOO=bar", "task-a", "task-b"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "task-a"},
|
||||
{Task: "task-b"},
|
||||
},
|
||||
ExpectedGlobals: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"FOO": {Static: "bar"},
|
||||
},
|
||||
[]string{"FOO"},
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: nil,
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "default"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "default"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Args: []string{"FOO=bar", "BAR=baz"},
|
||||
ExpectedCalls: []taskfile.Call{
|
||||
{Task: "default"},
|
||||
},
|
||||
ExpectedGlobals: &taskfile.Vars{
|
||||
OrderedMap: orderedmap.FromMapWithOrder(
|
||||
map[string]taskfile.Var{
|
||||
"FOO": {Static: "bar"},
|
||||
"BAR": {Static: "baz"},
|
||||
},
|
||||
[]string{"FOO", "BAR"},
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for i, test := range tests {
|
||||
t.Run(fmt.Sprintf("TestArgs%d", i+1), func(t *testing.T) {
|
||||
calls, globals := args.ParseV2(test.Args...)
|
||||
assert.Equal(t, test.ExpectedCalls, calls)
|
||||
if test.ExpectedGlobals.Len() > 0 || globals.Len() > 0 {
|
||||
assert.Equal(t, test.ExpectedGlobals, globals)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,421 +0,0 @@
|
||||
// This small web app is used to redirect from the old taskfile.org domain
|
||||
// to the new taskfile.dev without breaking CIs that uses cURL to download
|
||||
// "/install.sh" without the -L flag (which follow redirects).
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/install.sh" {
|
||||
println("Dumping install.sh")
|
||||
|
||||
w.Write(installShContent)
|
||||
return
|
||||
}
|
||||
|
||||
println("Redirecting to https://taskfile.dev" + r.URL.Path)
|
||||
|
||||
w.Header().Set("Location", "https://taskfile.dev"+r.URL.Path)
|
||||
w.WriteHeader(301)
|
||||
})
|
||||
|
||||
println("Listening :8080")
|
||||
|
||||
panic(http.ListenAndServe(":8080", nil))
|
||||
}
|
||||
|
||||
var installShContent = []byte(`#!/bin/sh
|
||||
set -e
|
||||
# Code generated by godownloader on 2018-04-07T17:47:38Z. DO NOT EDIT.
|
||||
#
|
||||
|
||||
usage() {
|
||||
this=$1
|
||||
cat <<EOF
|
||||
$this: download go binaries for go-task/task
|
||||
|
||||
Usage: $this [-b] bindir [-d] [tag]
|
||||
-b sets bindir or installation directory, Defaults to ./bin
|
||||
-d turns on debug logging
|
||||
[tag] is a tag from
|
||||
https://github.com/go-task/task/releases
|
||||
If tag is missing, then the latest will be used.
|
||||
|
||||
Generated by godownloader
|
||||
https://github.com/goreleaser/godownloader
|
||||
|
||||
EOF
|
||||
exit 2
|
||||
}
|
||||
|
||||
parse_args() {
|
||||
#BINDIR is ./bin unless set be ENV
|
||||
# over-ridden by flag below
|
||||
|
||||
BINDIR=${BINDIR:-./bin}
|
||||
while getopts "b:dh?" arg; do
|
||||
case "$arg" in
|
||||
b) BINDIR="$OPTARG" ;;
|
||||
d) log_set_priority 10 ;;
|
||||
h | \?) usage "$0" ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
TAG=$1
|
||||
}
|
||||
# this function wraps all the destructive operations
|
||||
# if a curl|bash cuts off the end of the script due to
|
||||
# network, either nothing will happen or will syntax error
|
||||
# out preventing half-done work
|
||||
execute() {
|
||||
tmpdir=$(mktmpdir)
|
||||
log_debug "downloading files into ${tmpdir}"
|
||||
http_download "${tmpdir}/${TARBALL}" "${TARBALL_URL}"
|
||||
http_download "${tmpdir}/${CHECKSUM}" "${CHECKSUM_URL}"
|
||||
hash_sha256_verify "${tmpdir}/${TARBALL}" "${tmpdir}/${CHECKSUM}"
|
||||
srcdir="${tmpdir}"
|
||||
(cd "${tmpdir}" && untar "${TARBALL}")
|
||||
install -d "${BINDIR}"
|
||||
for binexe in "task" ; do
|
||||
if [ "$OS" = "windows" ]; then
|
||||
binexe="${binexe}.exe"
|
||||
fi
|
||||
install "${srcdir}/${binexe}" "${BINDIR}/"
|
||||
log_info "installed ${BINDIR}/${binexe}"
|
||||
done
|
||||
}
|
||||
is_supported_platform() {
|
||||
platform=$1
|
||||
found=1
|
||||
case "$platform" in
|
||||
windows/386) found=0 ;;
|
||||
windows/amd64) found=0 ;;
|
||||
darwin/386) found=0 ;;
|
||||
darwin/amd64) found=0 ;;
|
||||
linux/386) found=0 ;;
|
||||
linux/amd64) found=0 ;;
|
||||
esac
|
||||
case "$platform" in
|
||||
darwin/386) found=1 ;;
|
||||
esac
|
||||
return $found
|
||||
}
|
||||
check_platform() {
|
||||
if is_supported_platform "$PLATFORM"; then
|
||||
# optional logging goes here
|
||||
true
|
||||
else
|
||||
log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
tag_to_version() {
|
||||
if [ -z "${TAG}" ]; then
|
||||
log_info "checking GitHub for latest tag"
|
||||
else
|
||||
log_info "checking GitHub for tag '${TAG}'"
|
||||
fi
|
||||
REALTAG=$(github_release "$OWNER/$REPO" "${TAG}") && true
|
||||
if test -z "$REALTAG"; then
|
||||
log_crit "unable to find '${TAG}' - use 'latest' or see https://github.com/${PREFIX}/releases for details"
|
||||
exit 1
|
||||
fi
|
||||
# if version starts with 'v', remove it
|
||||
TAG="$REALTAG"
|
||||
VERSION=${TAG#v}
|
||||
}
|
||||
adjust_format() {
|
||||
# change format (tar.gz or zip) based on ARCH
|
||||
case ${ARCH} in
|
||||
windows) FORMAT=zip ;;
|
||||
esac
|
||||
true
|
||||
}
|
||||
adjust_os() {
|
||||
# adjust archive name based on OS
|
||||
true
|
||||
}
|
||||
adjust_arch() {
|
||||
# adjust archive name based on ARCH
|
||||
true
|
||||
}
|
||||
|
||||
cat /dev/null <<EOF
|
||||
------------------------------------------------------------------------
|
||||
https://github.com/client9/shlib - portable posix shell functions
|
||||
Public domain - http://unlicense.org
|
||||
https://github.com/client9/shlib/blob/master/LICENSE.md
|
||||
but credit (and pull requests) appreciated.
|
||||
------------------------------------------------------------------------
|
||||
EOF
|
||||
is_command() {
|
||||
command -v "$1" >/dev/null
|
||||
}
|
||||
echoerr() {
|
||||
echo "$@" 1>&2
|
||||
}
|
||||
log_prefix() {
|
||||
echo "$0"
|
||||
}
|
||||
_logp=6
|
||||
log_set_priority() {
|
||||
_logp="$1"
|
||||
}
|
||||
log_priority() {
|
||||
if test -z "$1"; then
|
||||
echo "$_logp"
|
||||
return
|
||||
fi
|
||||
[ "$1" -le "$_logp" ]
|
||||
}
|
||||
log_tag() {
|
||||
case $1 in
|
||||
0) echo "emerg" ;;
|
||||
1) echo "alert" ;;
|
||||
2) echo "crit" ;;
|
||||
3) echo "err" ;;
|
||||
4) echo "warning" ;;
|
||||
5) echo "notice" ;;
|
||||
6) echo "info" ;;
|
||||
7) echo "debug" ;;
|
||||
*) echo "$1" ;;
|
||||
esac
|
||||
}
|
||||
log_debug() {
|
||||
log_priority 7 || return 0
|
||||
echoerr "$(log_prefix)" "$(log_tag 7)" "$@"
|
||||
}
|
||||
log_info() {
|
||||
log_priority 6 || return 0
|
||||
echoerr "$(log_prefix)" "$(log_tag 6)" "$@"
|
||||
}
|
||||
log_err() {
|
||||
log_priority 3 || return 0
|
||||
echoerr "$(log_prefix)" "$(log_tag 3)" "$@"
|
||||
}
|
||||
log_crit() {
|
||||
log_priority 2 || return 0
|
||||
echoerr "$(log_prefix)" "$(log_tag 2)" "$@"
|
||||
}
|
||||
uname_os() {
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
case "$os" in
|
||||
msys_nt) os="windows" ;;
|
||||
esac
|
||||
echo "$os"
|
||||
}
|
||||
uname_arch() {
|
||||
arch=$(uname -m)
|
||||
case $arch in
|
||||
x86_64) arch="amd64" ;;
|
||||
x86) arch="386" ;;
|
||||
i686) arch="386" ;;
|
||||
i386) arch="386" ;;
|
||||
aarch64) arch="arm64" ;;
|
||||
armv5*) arch="arm5" ;;
|
||||
armv6*) arch="arm6" ;;
|
||||
armv7*) arch="arm7" ;;
|
||||
esac
|
||||
echo ${arch}
|
||||
}
|
||||
uname_os_check() {
|
||||
os=$(uname_os)
|
||||
case "$os" in
|
||||
darwin) return 0 ;;
|
||||
dragonfly) return 0 ;;
|
||||
freebsd) return 0 ;;
|
||||
linux) return 0 ;;
|
||||
android) return 0 ;;
|
||||
nacl) return 0 ;;
|
||||
netbsd) return 0 ;;
|
||||
openbsd) return 0 ;;
|
||||
plan9) return 0 ;;
|
||||
solaris) return 0 ;;
|
||||
windows) return 0 ;;
|
||||
esac
|
||||
log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib"
|
||||
return 1
|
||||
}
|
||||
uname_arch_check() {
|
||||
arch=$(uname_arch)
|
||||
case "$arch" in
|
||||
386) return 0 ;;
|
||||
amd64) return 0 ;;
|
||||
arm64) return 0 ;;
|
||||
armv5) return 0 ;;
|
||||
armv6) return 0 ;;
|
||||
armv7) return 0 ;;
|
||||
ppc64) return 0 ;;
|
||||
ppc64le) return 0 ;;
|
||||
mips) return 0 ;;
|
||||
mipsle) return 0 ;;
|
||||
mips64) return 0 ;;
|
||||
mips64le) return 0 ;;
|
||||
s390x) return 0 ;;
|
||||
amd64p32) return 0 ;;
|
||||
esac
|
||||
log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib"
|
||||
return 1
|
||||
}
|
||||
untar() {
|
||||
tarball=$1
|
||||
case "${tarball}" in
|
||||
*.tar.gz | *.tgz) tar -xzf "${tarball}" ;;
|
||||
*.tar) tar -xf "${tarball}" ;;
|
||||
*.zip) unzip "${tarball}" ;;
|
||||
*)
|
||||
log_err "untar unknown archive format for ${tarball}"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
mktmpdir() {
|
||||
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
|
||||
mkdir -p "${TMPDIR}"
|
||||
echo "${TMPDIR}"
|
||||
}
|
||||
http_download_curl() {
|
||||
local_file=$1
|
||||
source_url=$2
|
||||
header=$3
|
||||
if [ -z "$header" ]; then
|
||||
code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url")
|
||||
else
|
||||
code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url")
|
||||
fi
|
||||
if [ "$code" != "200" ]; then
|
||||
log_debug "http_download_curl received HTTP status $code"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
http_download_wget() {
|
||||
local_file=$1
|
||||
source_url=$2
|
||||
header=$3
|
||||
if [ -z "$header" ]; then
|
||||
wget -q -O "$local_file" "$source_url"
|
||||
else
|
||||
wget -q --header "$header" -O "$local_file" "$source_url"
|
||||
fi
|
||||
}
|
||||
http_download() {
|
||||
log_debug "http_download $2"
|
||||
if is_command curl; then
|
||||
http_download_curl "$@"
|
||||
return
|
||||
elif is_command wget; then
|
||||
http_download_wget "$@"
|
||||
return
|
||||
fi
|
||||
log_crit "http_download unable to find wget or curl"
|
||||
return 1
|
||||
}
|
||||
http_copy() {
|
||||
tmp=$(mktemp)
|
||||
http_download "${tmp}" "$1" "$2" || return 1
|
||||
body=$(cat "$tmp")
|
||||
rm -f "${tmp}"
|
||||
echo "$body"
|
||||
}
|
||||
github_release() {
|
||||
owner_repo=$1
|
||||
version=$2
|
||||
test -z "$version" && version="latest"
|
||||
giturl="https://github.com/${owner_repo}/releases/${version}"
|
||||
json=$(http_copy "$giturl" "Accept:application/json")
|
||||
test -z "$json" && return 1
|
||||
version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//')
|
||||
test -z "$version" && return 1
|
||||
echo "$version"
|
||||
}
|
||||
hash_sha256() {
|
||||
TARGET=${1:-/dev/stdin}
|
||||
if is_command gsha256sum; then
|
||||
hash=$(gsha256sum "$TARGET") || return 1
|
||||
echo "$hash" | cut -d ' ' -f 1
|
||||
elif is_command sha256sum; then
|
||||
hash=$(sha256sum "$TARGET") || return 1
|
||||
echo "$hash" | cut -d ' ' -f 1
|
||||
elif is_command shasum; then
|
||||
hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1
|
||||
echo "$hash" | cut -d ' ' -f 1
|
||||
elif is_command openssl; then
|
||||
hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1
|
||||
echo "$hash" | cut -d ' ' -f a
|
||||
else
|
||||
log_crit "hash_sha256 unable to find command to compute sha-256 hash"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
hash_sha256_verify() {
|
||||
TARGET=$1
|
||||
checksums=$2
|
||||
if [ -z "$checksums" ]; then
|
||||
log_err "hash_sha256_verify checksum file not specified in arg2"
|
||||
return 1
|
||||
fi
|
||||
BASENAME=${TARGET##*/}
|
||||
want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1)
|
||||
if [ -z "$want" ]; then
|
||||
log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'"
|
||||
return 1
|
||||
fi
|
||||
got=$(hash_sha256 "$TARGET")
|
||||
if [ "$want" != "$got" ]; then
|
||||
log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
cat /dev/null <<EOF
|
||||
------------------------------------------------------------------------
|
||||
End of functions from https://github.com/client9/shlib
|
||||
------------------------------------------------------------------------
|
||||
EOF
|
||||
|
||||
PROJECT_NAME="task"
|
||||
OWNER=go-task
|
||||
REPO="task"
|
||||
BINARY=task
|
||||
FORMAT=tar.gz
|
||||
OS=$(uname_os)
|
||||
ARCH=$(uname_arch)
|
||||
PREFIX="$OWNER/$REPO"
|
||||
|
||||
# use in logging routines
|
||||
log_prefix() {
|
||||
echo "$PREFIX"
|
||||
}
|
||||
PLATFORM="${OS}/${ARCH}"
|
||||
GITHUB_DOWNLOAD=https://github.com/${OWNER}/${REPO}/releases/download
|
||||
|
||||
uname_os_check "$OS"
|
||||
uname_arch_check "$ARCH"
|
||||
|
||||
parse_args "$@"
|
||||
|
||||
check_platform
|
||||
|
||||
tag_to_version
|
||||
|
||||
adjust_format
|
||||
|
||||
adjust_os
|
||||
|
||||
adjust_arch
|
||||
|
||||
log_info "found version: ${VERSION} for ${TAG}/${OS}/${ARCH}"
|
||||
|
||||
NAME=${BINARY}_${OS}_${ARCH}
|
||||
TARBALL=${NAME}.${FORMAT}
|
||||
TARBALL_URL=${GITHUB_DOWNLOAD}/${TAG}/${TARBALL}
|
||||
CHECKSUM=task_checksums.txt
|
||||
CHECKSUM_URL=${GITHUB_DOWNLOAD}/${TAG}/${CHECKSUM}
|
||||
|
||||
|
||||
execute
|
||||
`)
|
||||
134
cmd/release/main.go
Normal file
134
cmd/release/main.go
Normal file
@@ -0,0 +1,134 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Masterminds/semver/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
changelogSource = "CHANGELOG.md"
|
||||
changelogTarget = "docs/docs/changelog.md"
|
||||
)
|
||||
|
||||
const changelogTemplate = `---
|
||||
slug: /changelog/
|
||||
sidebar_position: 9
|
||||
---`
|
||||
|
||||
var (
|
||||
changelogReleaseRegex = regexp.MustCompile(`## Unreleased`)
|
||||
changelogUserRegex = regexp.MustCompile(`@(\w+)`)
|
||||
changelogIssueRegex = regexp.MustCompile(`#(\d+)`)
|
||||
versionRegex = regexp.MustCompile(`(?m)^ "version": "\d+\.\d+\.\d+",$`)
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := release(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func release() error {
|
||||
if len(os.Args) != 2 {
|
||||
return errors.New("error: expected version number")
|
||||
}
|
||||
|
||||
version, err := getVersion()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := bumpVersion(version, os.Args[1]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(version)
|
||||
|
||||
if err := changelog(version); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := setJSONVersion("package.json", version); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := setJSONVersion("package-lock.json", version); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getVersion() (*semver.Version, error) {
|
||||
cmd := exec.Command("git", "describe", "--tags", "--abbrev=0")
|
||||
b, err := cmd.Output()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return semver.NewVersion(strings.TrimSpace(string(b)))
|
||||
}
|
||||
|
||||
func bumpVersion(version *semver.Version, verb string) error {
|
||||
switch verb {
|
||||
case "major":
|
||||
*version = version.IncMajor()
|
||||
case "minor":
|
||||
*version = version.IncMinor()
|
||||
case "patch":
|
||||
*version = version.IncPatch()
|
||||
default:
|
||||
*version = *semver.MustParse(verb)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func changelog(version *semver.Version) error {
|
||||
// Open changelog source file
|
||||
b, err := os.ReadFile(changelogSource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
changelog := string(b)
|
||||
date := time.Now().Format("2006-01-02")
|
||||
|
||||
// Replace "Unreleased" with the new version and date
|
||||
changelog = changelogReleaseRegex.ReplaceAllString(changelog, fmt.Sprintf("## v%s - %s", version, date))
|
||||
|
||||
// Write the changelog to the source file
|
||||
if err := os.WriteFile(changelogSource, []byte(changelog), 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Add the frontmatter to the changelog
|
||||
changelog = fmt.Sprintf("%s\n\n%s", changelogTemplate, changelog)
|
||||
|
||||
// Replace @user and #issue with full links
|
||||
changelog = changelogUserRegex.ReplaceAllString(changelog, "[@$1](https://github.com/$1)")
|
||||
changelog = changelogIssueRegex.ReplaceAllString(changelog, "[#$1](https://github.com/go-task/task/issues/$1)")
|
||||
|
||||
// Write the changelog to the target file
|
||||
return os.WriteFile(changelogTarget, []byte(changelog), 0o644)
|
||||
}
|
||||
|
||||
func setJSONVersion(fileName string, version *semver.Version) error {
|
||||
// Read the JSON file
|
||||
b, err := os.ReadFile(fileName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Replace the version
|
||||
new := versionRegex.ReplaceAllString(string(b), fmt.Sprintf(` "version": "%s",`, version.String()))
|
||||
|
||||
// Write the JSON file
|
||||
return os.WriteFile(fileName, []byte(new), 0o644)
|
||||
}
|
||||
171
cmd/sleepit/sleepit.go
Normal file
171
cmd/sleepit/sleepit.go
Normal file
@@ -0,0 +1,171 @@
|
||||
// This code is released under the MIT License
|
||||
// Copyright (c) 2020 Marco Molteni and the timeit contributors.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"time"
|
||||
)
|
||||
|
||||
const usage = `sleepit: sleep for the specified duration, optionally handling signals
|
||||
When the line "sleepit: ready" is printed, it means that it is safe to send signals to it
|
||||
Usage: sleepit <command> [<args>]
|
||||
Commands
|
||||
default Use default action: on reception of SIGINT terminate abruptly
|
||||
handle Handle signals: on reception of SIGINT perform cleanup before exiting
|
||||
version Show the sleepit version`
|
||||
|
||||
// Filled by the linker.
|
||||
var fullVersion = "unknown" // example: v0.0.9-8-g941583d027-dirty
|
||||
|
||||
func main() {
|
||||
os.Exit(run(os.Args[1:]))
|
||||
}
|
||||
|
||||
func run(args []string) int {
|
||||
if len(args) < 1 {
|
||||
fmt.Fprintln(os.Stderr, usage)
|
||||
return 2
|
||||
}
|
||||
|
||||
defaultCmd := flag.NewFlagSet("default", flag.ExitOnError)
|
||||
defaultSleep := defaultCmd.Duration("sleep", 5*time.Second, "Sleep duration")
|
||||
|
||||
handleCmd := flag.NewFlagSet("handle", flag.ExitOnError)
|
||||
handleSleep := handleCmd.Duration("sleep", 5*time.Second, "Sleep duration")
|
||||
handleCleanup := handleCmd.Duration("cleanup", 5*time.Second, "Cleanup duration")
|
||||
handleTermAfter := handleCmd.Int("term-after", 0,
|
||||
"Terminate immediately after `N` signals.\n"+
|
||||
"Default is to terminate only when the cleanup phase has completed.")
|
||||
|
||||
versionCmd := flag.NewFlagSet("version", flag.ExitOnError)
|
||||
|
||||
switch args[0] {
|
||||
|
||||
case "default":
|
||||
_ = defaultCmd.Parse(args[1:])
|
||||
if len(defaultCmd.Args()) > 0 {
|
||||
fmt.Fprintf(os.Stderr, "default: unexpected arguments: %v\n", defaultCmd.Args())
|
||||
return 2
|
||||
}
|
||||
return supervisor(*defaultSleep, 0, 0, nil)
|
||||
|
||||
case "handle":
|
||||
_ = handleCmd.Parse(args[1:])
|
||||
if *handleTermAfter == 1 {
|
||||
fmt.Fprintf(os.Stderr, "handle: term-after cannot be 1\n")
|
||||
return 2
|
||||
}
|
||||
if len(handleCmd.Args()) > 0 {
|
||||
fmt.Fprintf(os.Stderr, "handle: unexpected arguments: %v\n", handleCmd.Args())
|
||||
return 2
|
||||
}
|
||||
sigCh := make(chan os.Signal, 1)
|
||||
signal.Notify(sigCh, os.Interrupt) // Ctrl-C -> SIGINT
|
||||
return supervisor(*handleSleep, *handleCleanup, *handleTermAfter, sigCh)
|
||||
|
||||
case "version":
|
||||
_ = versionCmd.Parse(args[1:])
|
||||
if len(versionCmd.Args()) > 0 {
|
||||
fmt.Fprintf(os.Stderr, "version: unexpected arguments: %v\n", versionCmd.Args())
|
||||
return 2
|
||||
}
|
||||
fmt.Printf("sleepit version %s\n", fullVersion)
|
||||
return 0
|
||||
|
||||
default:
|
||||
fmt.Fprintln(os.Stderr, usage)
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
func supervisor(
|
||||
sleep time.Duration,
|
||||
cleanup time.Duration,
|
||||
termAfter int,
|
||||
sigCh <-chan os.Signal,
|
||||
) int {
|
||||
fmt.Printf("sleepit: ready\n")
|
||||
fmt.Printf("sleepit: PID=%d sleep=%v cleanup=%v\n",
|
||||
os.Getpid(), sleep, cleanup)
|
||||
|
||||
cancelWork := make(chan struct{})
|
||||
workerDone := worker(cancelWork, sleep, "work")
|
||||
|
||||
cancelCleaner := make(chan struct{})
|
||||
var cleanerDone <-chan struct{}
|
||||
|
||||
sigCount := 0
|
||||
for {
|
||||
select {
|
||||
case sig := <-sigCh:
|
||||
sigCount++
|
||||
fmt.Printf("sleepit: got signal=%s count=%d\n", sig, sigCount)
|
||||
if sigCount == 1 {
|
||||
// since `cancelWork` is unbuffered, sending will be synchronous:
|
||||
// we are ensured that the worker has terminated before starting cleanup.
|
||||
// This is important in some real-life situations.
|
||||
cancelWork <- struct{}{}
|
||||
cleanerDone = worker(cancelCleaner, cleanup, "cleanup")
|
||||
}
|
||||
if sigCount == termAfter {
|
||||
cancelCleaner <- struct{}{}
|
||||
return 4
|
||||
}
|
||||
case <-workerDone:
|
||||
return 0
|
||||
case <-cleanerDone:
|
||||
return 3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Start a worker goroutine and return immediately a `workerDone` channel.
|
||||
// The goroutine will prepend its prints with the prefix `name`.
|
||||
// The goroutine will simulate some work and will terminate when one of the following
|
||||
// conditions happens:
|
||||
// 1. When `howlong` is elapsed. This case will be signaled on the `workerDone` channel.
|
||||
// 2. When something happens on channel `canceled`. Note that this simulates real-life,
|
||||
// so cancellation is not instantaneous: if the caller wants a synchronous cancel,
|
||||
// it should send a message; if instead it wants an asynchronous cancel, it should
|
||||
// close the channel.
|
||||
func worker(
|
||||
canceled <-chan struct{},
|
||||
howlong time.Duration,
|
||||
name string,
|
||||
) <-chan struct{} {
|
||||
workerDone := make(chan struct{})
|
||||
deadline := time.Now().Add(howlong)
|
||||
go func() {
|
||||
fmt.Printf("sleepit: %s started\n", name)
|
||||
for {
|
||||
select {
|
||||
case <-canceled:
|
||||
fmt.Printf("sleepit: %s canceled\n", name)
|
||||
return
|
||||
default:
|
||||
if doSomeWork(deadline) {
|
||||
fmt.Printf("sleepit: %s done\n", name) // <== NOTE THIS LINE
|
||||
workerDone <- struct{}{}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return workerDone
|
||||
}
|
||||
|
||||
// Do some work and then return, so that the caller can decide wether to continue or not.
|
||||
// Return true when all work is done.
|
||||
func doSomeWork(deadline time.Time) bool {
|
||||
if time.Now().After(deadline) {
|
||||
return true
|
||||
}
|
||||
timeout := 100 * time.Millisecond
|
||||
time.Sleep(timeout)
|
||||
return false
|
||||
}
|
||||
316
cmd/task/task.go
316
cmd/task/task.go
@@ -2,22 +2,26 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/go-task/task/v2"
|
||||
"github.com/go-task/task/v2/internal/args"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
"mvdan.cc/sh/v3/syntax"
|
||||
|
||||
"github.com/go-task/task/v3"
|
||||
"github.com/go-task/task/v3/args"
|
||||
"github.com/go-task/task/v3/errors"
|
||||
"github.com/go-task/task/v3/internal/logger"
|
||||
"github.com/go-task/task/v3/internal/sort"
|
||||
ver "github.com/go-task/task/v3/internal/version"
|
||||
"github.com/go-task/task/v3/taskfile"
|
||||
)
|
||||
|
||||
var (
|
||||
version = "master"
|
||||
)
|
||||
|
||||
const usage = `Usage: task [-ilfwvsd] [--init] [--list] [--force] [--watch] [--verbose] [--silent] [--dir] [--dry] [--summary] [task...]
|
||||
const usage = `Usage: task [flags...] [task...]
|
||||
|
||||
Runs the specified task(s). Falls back to the "default" task if no task name
|
||||
was specified, or lists all tasks if an unknown task name was specified.
|
||||
@@ -26,18 +30,70 @@ Example: 'task hello' with the following 'Taskfile.yml' file will generate an
|
||||
'output.txt' file with the content "hello".
|
||||
|
||||
'''
|
||||
hello:
|
||||
cmds:
|
||||
- echo "I am going to write a file named 'output.txt' now."
|
||||
- echo "hello" > output.txt
|
||||
generates:
|
||||
- output.txt
|
||||
version: '3'
|
||||
tasks:
|
||||
hello:
|
||||
cmds:
|
||||
- echo "I am going to write a file named 'output.txt' now."
|
||||
- echo "hello" > output.txt
|
||||
generates:
|
||||
- output.txt
|
||||
'''
|
||||
|
||||
Options:
|
||||
`
|
||||
|
||||
var flags struct {
|
||||
version bool
|
||||
help bool
|
||||
init bool
|
||||
list bool
|
||||
listAll bool
|
||||
listJson bool
|
||||
taskSort string
|
||||
status bool
|
||||
force bool
|
||||
watch bool
|
||||
verbose bool
|
||||
silent bool
|
||||
assumeYes bool
|
||||
dry bool
|
||||
summary bool
|
||||
exitCode bool
|
||||
parallel bool
|
||||
concurrency int
|
||||
dir string
|
||||
entrypoint string
|
||||
output taskfile.Output
|
||||
color bool
|
||||
interval time.Duration
|
||||
global bool
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := run(); err != nil {
|
||||
l := &logger.Logger{
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
Verbose: flags.verbose,
|
||||
Color: flags.color,
|
||||
}
|
||||
|
||||
if err, ok := err.(*errors.TaskRunError); ok && flags.exitCode {
|
||||
l.Errf(logger.Red, "%v\n", err)
|
||||
os.Exit(err.TaskExitCode())
|
||||
}
|
||||
if err, ok := err.(errors.TaskError); ok {
|
||||
l.Errf(logger.Red, "%v\n", err)
|
||||
os.Exit(err.Code())
|
||||
}
|
||||
l.Errf(logger.Red, "%v\n", err)
|
||||
os.Exit(errors.CodeUnknown)
|
||||
}
|
||||
os.Exit(errors.CodeOk)
|
||||
}
|
||||
|
||||
func run() error {
|
||||
log.SetFlags(0)
|
||||
log.SetOutput(os.Stderr)
|
||||
|
||||
@@ -46,41 +102,46 @@ func main() {
|
||||
pflag.PrintDefaults()
|
||||
}
|
||||
|
||||
var (
|
||||
versionFlag bool
|
||||
init bool
|
||||
list bool
|
||||
status bool
|
||||
force bool
|
||||
watch bool
|
||||
verbose bool
|
||||
silent bool
|
||||
dry bool
|
||||
summary bool
|
||||
dir string
|
||||
output string
|
||||
)
|
||||
|
||||
pflag.BoolVar(&versionFlag, "version", false, "show Task version")
|
||||
pflag.BoolVarP(&init, "init", "i", false, "creates a new Taskfile.yml in the current folder")
|
||||
pflag.BoolVarP(&list, "list", "l", false, "lists tasks with description of current Taskfile")
|
||||
pflag.BoolVar(&status, "status", false, "exits with non-zero exit code if any of the given tasks is not up-to-date")
|
||||
pflag.BoolVarP(&force, "force", "f", false, "forces execution even when the task is up-to-date")
|
||||
pflag.BoolVarP(&watch, "watch", "w", false, "enables watch of the given task")
|
||||
pflag.BoolVarP(&verbose, "verbose", "v", false, "enables verbose mode")
|
||||
pflag.BoolVarP(&silent, "silent", "s", false, "disables echoing")
|
||||
pflag.BoolVar(&dry, "dry", false, "compiles and prints tasks in the order that they would be run, without executing them")
|
||||
pflag.BoolVar(&summary, "summary", false, "show summary about a task")
|
||||
pflag.StringVarP(&dir, "dir", "d", "", "sets directory of execution")
|
||||
pflag.StringVarP(&output, "output", "o", "", "sets output style: [interleaved|group|prefixed]")
|
||||
pflag.BoolVar(&flags.version, "version", false, "Show Task version.")
|
||||
pflag.BoolVarP(&flags.help, "help", "h", false, "Shows Task usage.")
|
||||
pflag.BoolVarP(&flags.init, "init", "i", false, "Creates a new Taskfile.yml in the current folder.")
|
||||
pflag.BoolVarP(&flags.list, "list", "l", false, "Lists tasks with description of current Taskfile.")
|
||||
pflag.BoolVarP(&flags.listAll, "list-all", "a", false, "Lists tasks with or without a description.")
|
||||
pflag.BoolVarP(&flags.listJson, "json", "j", false, "Formats task list as JSON.")
|
||||
pflag.StringVar(&flags.taskSort, "sort", "", "Changes the order of the tasks when listed. [default|alphanumeric|none].")
|
||||
pflag.BoolVar(&flags.status, "status", false, "Exits with non-zero exit code if any of the given tasks is not up-to-date.")
|
||||
pflag.BoolVarP(&flags.force, "force", "f", false, "Forces execution even when the task is up-to-date.")
|
||||
pflag.BoolVarP(&flags.watch, "watch", "w", false, "Enables watch of the given task.")
|
||||
pflag.BoolVarP(&flags.verbose, "verbose", "v", false, "Enables verbose mode.")
|
||||
pflag.BoolVarP(&flags.silent, "silent", "s", false, "Disables echoing.")
|
||||
pflag.BoolVarP(&flags.assumeYes, "yes", "y", false, "Assume \"yes\" as answer to all prompts.")
|
||||
pflag.BoolVarP(&flags.parallel, "parallel", "p", false, "Executes tasks provided on command line in parallel.")
|
||||
pflag.BoolVarP(&flags.dry, "dry", "n", false, "Compiles and prints tasks in the order that they would be run, without executing them.")
|
||||
pflag.BoolVar(&flags.summary, "summary", false, "Show summary about a task.")
|
||||
pflag.BoolVarP(&flags.exitCode, "exit-code", "x", false, "Pass-through the exit code of the task command.")
|
||||
pflag.StringVarP(&flags.dir, "dir", "d", "", "Sets directory of execution.")
|
||||
pflag.StringVarP(&flags.entrypoint, "taskfile", "t", "", `Choose which Taskfile to run. Defaults to "Taskfile.yml".`)
|
||||
pflag.StringVarP(&flags.output.Name, "output", "o", "", "Sets output style: [interleaved|group|prefixed].")
|
||||
pflag.StringVar(&flags.output.Group.Begin, "output-group-begin", "", "Message template to print before a task's grouped output.")
|
||||
pflag.StringVar(&flags.output.Group.End, "output-group-end", "", "Message template to print after a task's grouped output.")
|
||||
pflag.BoolVar(&flags.output.Group.ErrorOnly, "output-group-error-only", false, "Swallow output from successful tasks.")
|
||||
pflag.BoolVarP(&flags.color, "color", "c", true, "Colored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable.")
|
||||
pflag.IntVarP(&flags.concurrency, "concurrency", "C", 0, "Limit number tasks to run concurrently.")
|
||||
pflag.DurationVarP(&flags.interval, "interval", "I", 0, "Interval to watch for changes.")
|
||||
pflag.BoolVarP(&flags.global, "global", "g", false, "Runs global Taskfile, from $HOME/Taskfile.{yml,yaml}.")
|
||||
pflag.Parse()
|
||||
|
||||
if versionFlag {
|
||||
log.Printf("Task version: %s\n", version)
|
||||
return
|
||||
if flags.version {
|
||||
fmt.Printf("Task version: %s\n", ver.GetVersion())
|
||||
return nil
|
||||
}
|
||||
|
||||
if init {
|
||||
if flags.help {
|
||||
pflag.Usage()
|
||||
return nil
|
||||
}
|
||||
|
||||
if flags.init {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -88,69 +149,146 @@ func main() {
|
||||
if err := task.InitTaskfile(os.Stdout, wd); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
||||
if flags.global && flags.dir != "" {
|
||||
log.Fatal("task: You can't set both --global and --dir")
|
||||
return nil
|
||||
}
|
||||
if flags.global {
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return fmt.Errorf("task: Failed to get user home directory: %w", err)
|
||||
}
|
||||
flags.dir = home
|
||||
}
|
||||
|
||||
if flags.dir != "" && flags.entrypoint != "" {
|
||||
return errors.New("task: You can't set both --dir and --taskfile")
|
||||
}
|
||||
if flags.entrypoint != "" {
|
||||
flags.dir = filepath.Dir(flags.entrypoint)
|
||||
flags.entrypoint = filepath.Base(flags.entrypoint)
|
||||
}
|
||||
|
||||
if flags.output.Name != "group" {
|
||||
if flags.output.Group.Begin != "" {
|
||||
return errors.New("task: You can't set --output-group-begin without --output=group")
|
||||
}
|
||||
if flags.output.Group.End != "" {
|
||||
return errors.New("task: You can't set --output-group-end without --output=group")
|
||||
}
|
||||
if flags.output.Group.ErrorOnly {
|
||||
return errors.New("task: You can't set --output-group-error-only without --output=group")
|
||||
}
|
||||
}
|
||||
|
||||
var taskSorter sort.TaskSorter
|
||||
switch flags.taskSort {
|
||||
case "none":
|
||||
taskSorter = &sort.Noop{}
|
||||
case "alphanumeric":
|
||||
taskSorter = &sort.AlphaNumeric{}
|
||||
}
|
||||
|
||||
e := task.Executor{
|
||||
Force: force,
|
||||
Watch: watch,
|
||||
Verbose: verbose,
|
||||
Silent: silent,
|
||||
Dir: dir,
|
||||
Dry: dry,
|
||||
Summary: summary,
|
||||
Force: flags.force,
|
||||
Watch: flags.watch,
|
||||
Verbose: flags.verbose,
|
||||
Silent: flags.silent,
|
||||
AssumeYes: flags.assumeYes,
|
||||
Dir: flags.dir,
|
||||
Dry: flags.dry,
|
||||
Entrypoint: flags.entrypoint,
|
||||
Summary: flags.summary,
|
||||
Parallel: flags.parallel,
|
||||
Color: flags.color,
|
||||
Concurrency: flags.concurrency,
|
||||
Interval: flags.interval,
|
||||
|
||||
Stdin: os.Stdin,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
|
||||
OutputStyle: output,
|
||||
OutputStyle: flags.output,
|
||||
TaskSorter: taskSorter,
|
||||
}
|
||||
|
||||
listOptions := task.NewListOptions(flags.list, flags.listAll, flags.listJson)
|
||||
if err := listOptions.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if (listOptions.ShouldListTasks()) && flags.silent {
|
||||
e.ListTaskNames(flags.listAll)
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := e.Setup(); err != nil {
|
||||
log.Fatal(err)
|
||||
return err
|
||||
}
|
||||
|
||||
if list {
|
||||
e.PrintTasksHelp()
|
||||
return
|
||||
if listOptions.ShouldListTasks() {
|
||||
foundTasks, err := e.ListTasks(listOptions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !foundTasks {
|
||||
os.Exit(errors.CodeUnknown)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
arguments := pflag.Args()
|
||||
if len(arguments) == 0 {
|
||||
log.Println("task: No argument given, trying default task")
|
||||
arguments = []string{"default"}
|
||||
}
|
||||
var (
|
||||
calls []taskfile.Call
|
||||
globals *taskfile.Vars
|
||||
)
|
||||
|
||||
calls, err := args.Parse(arguments...)
|
||||
tasksAndVars, cliArgs, err := getArgs()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
return err
|
||||
}
|
||||
|
||||
if e.Taskfile.Version.Compare(taskfile.V3) >= 0 {
|
||||
calls, globals = args.ParseV3(tasksAndVars...)
|
||||
} else {
|
||||
calls, globals = args.ParseV2(tasksAndVars...)
|
||||
}
|
||||
|
||||
globals.Set("CLI_ARGS", taskfile.Var{Static: cliArgs})
|
||||
e.Taskfile.Vars.Merge(globals)
|
||||
|
||||
if !flags.watch {
|
||||
e.InterceptInterruptSignals()
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
if !watch {
|
||||
ctx = getSignalContext()
|
||||
|
||||
if flags.status {
|
||||
return e.Status(ctx, calls...)
|
||||
}
|
||||
|
||||
if status {
|
||||
if err = e.Status(ctx, calls...); err != nil {
|
||||
log.Fatal(err)
|
||||
return e.Run(ctx, calls...)
|
||||
}
|
||||
|
||||
func getArgs() ([]string, string, error) {
|
||||
var (
|
||||
args = pflag.Args()
|
||||
doubleDashPos = pflag.CommandLine.ArgsLenAtDash()
|
||||
)
|
||||
|
||||
if doubleDashPos == -1 {
|
||||
return args, "", nil
|
||||
}
|
||||
|
||||
var quotedCliArgs []string
|
||||
for _, arg := range args[doubleDashPos:] {
|
||||
quotedCliArg, err := syntax.Quote(arg, syntax.LangBash)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err := e.Run(ctx, calls...); err != nil {
|
||||
log.Fatal(err)
|
||||
quotedCliArgs = append(quotedCliArgs, quotedCliArg)
|
||||
}
|
||||
}
|
||||
|
||||
func getSignalContext() context.Context {
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, os.Interrupt, os.Kill, syscall.SIGTERM)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go func() {
|
||||
sig := <-ch
|
||||
log.Printf("task: signal received: %s", sig)
|
||||
cancel()
|
||||
}()
|
||||
return ctx
|
||||
return args[:doubleDashPos], strings.Join(quotedCliArgs, " "), nil
|
||||
}
|
||||
|
||||
55
completion/bash/task.bash
Normal file
55
completion/bash/task.bash
Normal file
@@ -0,0 +1,55 @@
|
||||
# vim: set tabstop=2 shiftwidth=2 expandtab:
|
||||
|
||||
_GO_TASK_COMPLETION_LIST_OPTION='--list-all'
|
||||
|
||||
function _task()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion -n : || return
|
||||
|
||||
# Check for `--` within command-line and quit or strip suffix.
|
||||
local i
|
||||
for i in "${!words[@]}"; do
|
||||
if [ "${words[$i]}" == "--" ]; then
|
||||
# Do not complete words following `--` passed to CLI_ARGS.
|
||||
[ $cword -gt $i ] && return
|
||||
# Remove the words following `--` to not put --list in CLI_ARGS.
|
||||
words=( "${words[@]:0:$i}" )
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Handle special arguments of options.
|
||||
case "$prev" in
|
||||
-d|--dir)
|
||||
_filedir -d
|
||||
return $?
|
||||
;;
|
||||
-t|--taskfile)
|
||||
_filedir yaml || return $?
|
||||
_filedir yml
|
||||
return $?
|
||||
;;
|
||||
-o|--output)
|
||||
COMPREPLY=( $( compgen -W "interleaved group prefixed" -- $cur ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Handle normal options.
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "$(_parse_help $1)" -- $cur ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prepare task name completions.
|
||||
local tasks=( $( "${words[@]}" --silent $_GO_TASK_COMPLETION_LIST_OPTION 2> /dev/null ) )
|
||||
COMPREPLY=( $( compgen -W "${tasks[*]}" -- "$cur" ) )
|
||||
|
||||
# Post-process because task names might contain colons.
|
||||
__ltrim_colon_completions "$cur"
|
||||
}
|
||||
|
||||
complete -F _task task
|
||||
37
completion/fish/task.fish
Normal file
37
completion/fish/task.fish
Normal file
@@ -0,0 +1,37 @@
|
||||
set GO_TASK_PROGNAME task
|
||||
|
||||
function __task_get_tasks --description "Prints all available tasks with their description"
|
||||
# Read the list of tasks (and potential errors)
|
||||
$GO_TASK_PROGNAME --list-all 2>&1 | read -lz rawOutput
|
||||
|
||||
# Return on non-zero exit code (for cases when there is no Taskfile found or etc.)
|
||||
if test $status -ne 0
|
||||
return
|
||||
end
|
||||
|
||||
# Grab names and descriptions (if any) of the tasks
|
||||
set -l output (echo $rawOutput | sed -e '1d; s/\* \(.*\):\s*\(.*\)\s*(aliases.*/\1\t\2/' -e 's/\* \(.*\):\s*\(.*\)/\1\t\2/'| string split0)
|
||||
if test $output
|
||||
echo $output
|
||||
end
|
||||
end
|
||||
|
||||
complete -c $GO_TASK_PROGNAME -d 'Runs the specified task(s). Falls back to the "default" task if no task name was specified, or lists all tasks if an unknown task name was
|
||||
specified.' -xa "(__task_get_tasks)"
|
||||
|
||||
complete -c $GO_TASK_PROGNAME -s c -l color -d 'colored output (default true)'
|
||||
complete -c $GO_TASK_PROGNAME -s d -l dir -d 'sets directory of execution'
|
||||
complete -c $GO_TASK_PROGNAME -l dry -d 'compiles and prints tasks in the order that they would be run, without executing them'
|
||||
complete -c $GO_TASK_PROGNAME -s f -l force -d 'forces execution even when the task is up-to-date'
|
||||
complete -c $GO_TASK_PROGNAME -s h -l help -d 'shows Task usage'
|
||||
complete -c $GO_TASK_PROGNAME -s i -l init -d 'creates a new Taskfile.yml in the current folder'
|
||||
complete -c $GO_TASK_PROGNAME -s l -l list -d 'lists tasks with description of current Taskfile'
|
||||
complete -c $GO_TASK_PROGNAME -s o -l output -d 'sets output style: [interleaved|group|prefixed]' -xa "interleaved group prefixed"
|
||||
complete -c $GO_TASK_PROGNAME -s p -l parallel -d 'executes tasks provided on command line in parallel'
|
||||
complete -c $GO_TASK_PROGNAME -s s -l silent -d 'disables echoing'
|
||||
complete -c $GO_TASK_PROGNAME -l status -d 'exits with non-zero exit code if any of the given tasks is not up-to-date'
|
||||
complete -c $GO_TASK_PROGNAME -l summary -d 'show summary about a task'
|
||||
complete -c $GO_TASK_PROGNAME -s t -l taskfile -d 'choose which Taskfile to run. Defaults to "Taskfile.yml"'
|
||||
complete -c $GO_TASK_PROGNAME -s v -l verbose -d 'enables verbose mode'
|
||||
complete -c $GO_TASK_PROGNAME -l version -d 'show Task version'
|
||||
complete -c $GO_TASK_PROGNAME -s w -l watch -d 'enables watch of the given task'
|
||||
28
completion/ps/task.ps1
Normal file
28
completion/ps/task.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
using namespace System.Management.Automation
|
||||
|
||||
Register-ArgumentCompleter -CommandName task -ScriptBlock {
|
||||
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
|
||||
|
||||
if ($commandName.StartsWith('-')) {
|
||||
$completions = @(
|
||||
[CompletionResult]::new('--list-all ', '--list-all ', [CompletionResultType]::ParameterName, 'list all tasks'),
|
||||
[CompletionResult]::new('--color ', '--color', [CompletionResultType]::ParameterName, '--color'),
|
||||
[CompletionResult]::new('--concurrency=', '--concurrency=', [CompletionResultType]::ParameterName, 'concurrency'),
|
||||
[CompletionResult]::new('--interval=', '--interval=', [CompletionResultType]::ParameterName, 'interval'),
|
||||
[CompletionResult]::new('--output=interleaved ', '--output=interleaved', [CompletionResultType]::ParameterName, '--output='),
|
||||
[CompletionResult]::new('--output=group ', '--output=group', [CompletionResultType]::ParameterName, '--output='),
|
||||
[CompletionResult]::new('--output=prefixed ', '--output=prefixed', [CompletionResultType]::ParameterName, '--output='),
|
||||
[CompletionResult]::new('--dry ', '--dry', [CompletionResultType]::ParameterName, '--dry'),
|
||||
[CompletionResult]::new('--force ', '--force', [CompletionResultType]::ParameterName, '--force'),
|
||||
[CompletionResult]::new('--parallel ', '--parallel', [CompletionResultType]::ParameterName, '--parallel'),
|
||||
[CompletionResult]::new('--silent ', '--silent', [CompletionResultType]::ParameterName, '--silent'),
|
||||
[CompletionResult]::new('--status ', '--status', [CompletionResultType]::ParameterName, '--status'),
|
||||
[CompletionResult]::new('--verbose ', '--verbose', [CompletionResultType]::ParameterName, '--verbose'),
|
||||
[CompletionResult]::new('--watch ', '--watch', [CompletionResultType]::ParameterName, '--watch')
|
||||
)
|
||||
|
||||
return $completions.Where{ $_.CompletionText.StartsWith($commandName) }
|
||||
}
|
||||
|
||||
return $(task --list-all --silent) | Where-Object { $_.StartsWith($commandName) } | ForEach-Object { return $_ + " " }
|
||||
}
|
||||
@@ -1,25 +1,62 @@
|
||||
#compdef task
|
||||
|
||||
# Listing commands from Taskfile.yml
|
||||
function __list() {
|
||||
local -a scripts
|
||||
local context state state_descr line
|
||||
typeset -A opt_args
|
||||
|
||||
if [ -f Taskfile.yml ]; then
|
||||
scripts=($(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/'))
|
||||
_describe 'script' scripts
|
||||
_GO_TASK_COMPLETION_LIST_OPTION="${GO_TASK_COMPLETION_LIST_OPTION:---list-all}"
|
||||
|
||||
# Listing commands from Taskfile.yml
|
||||
function __task_list() {
|
||||
local -a scripts cmd
|
||||
local -i enabled=0
|
||||
local taskfile item task desc
|
||||
|
||||
cmd=(task)
|
||||
taskfile="${(v)opt_args[(i)-t|--taskfile]}"
|
||||
|
||||
if [[ -n "$taskfile" && -f "$taskfile" ]]; then
|
||||
enabled=1
|
||||
cmd+=(--taskfile "$taskfile")
|
||||
else
|
||||
for taskfile in Taskfile{,.dist}.{yaml,yml}; do
|
||||
if [[ -f "$taskfile" ]]; then
|
||||
enabled=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
(( enabled )) || return 0
|
||||
|
||||
scripts=()
|
||||
for item in "${(@)${(f)$("${cmd[@]}" $_GO_TASK_COMPLETION_LIST_OPTION)}[2,-1]#\* }"; do
|
||||
task="${item%%:[[:space:]]*}"
|
||||
desc="${item##[^[:space:]]##[[:space:]]##}"
|
||||
scripts+=( "${task//:/\\:}:$desc" )
|
||||
done
|
||||
_describe 'Task to run' scripts
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'(-d --dir)'{-d,--dir}': :_files' \
|
||||
'(--dry)'--dry \
|
||||
'(-f --force)'{-f,--force} \
|
||||
'(-i --init)'{-i,--init} \
|
||||
'(-l --list)'{-l,--list} \
|
||||
'(-s --silent)'{-s,--silent} \
|
||||
'(--status)'--status \
|
||||
'(-v --verbose)'{-v,--verbose} \
|
||||
'(--version)'--version \
|
||||
'(-w --watch)'{-w,--watch} \
|
||||
'(- *)'{-h,--help} \
|
||||
'*: :__list' \
|
||||
'(-C --concurrency)'{-C,--concurrency}'[limit number of concurrent tasks]: ' \
|
||||
'(-p --parallel)'{-p,--parallel}'[run command-line tasks in parallel]' \
|
||||
'(-f --force)'{-f,--force}'[run even if task is up-to-date]' \
|
||||
'(-c --color)'{-c,--color}'[colored output]' \
|
||||
'(-d --dir)'{-d,--dir}'[dir to run in]:execution dir:_dirs' \
|
||||
'(--dry)--dry[dry-run mode, compile and print tasks only]' \
|
||||
'(-o --output)'{-o,--output}'[set output style]:style:(interleaved group prefixed)' \
|
||||
'(--output-group-begin)--output-group-begin[message template before grouped output]:template text: ' \
|
||||
'(--output-group-end)--output-group-end[message template after grouped output]:template text: ' \
|
||||
'(-s --silent)'{-s,--silent}'[disable echoing]' \
|
||||
'(--status)--status[exit non-zero if supplied tasks not up-to-date]' \
|
||||
'(--summary)--summary[show summary\: field from tasks instead of running them]' \
|
||||
'(-t --taskfile)'{-t,--taskfile}'[specify a different taskfile]:taskfile:_files' \
|
||||
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
|
||||
'(-w --watch)'{-w,--watch}'[watch-mode for given tasks, re-run when inputs change]' \
|
||||
+ '(operation)' \
|
||||
{-l,--list}'[list describable tasks]' \
|
||||
{-a,--list-all}'[list all tasks]' \
|
||||
{-i,--init}'[create new Taskfile.yml]' \
|
||||
'(-*)'{-h,--help}'[show help]' \
|
||||
'(-*)--version[show version and exit]' \
|
||||
'*: :__task_list'
|
||||
|
||||
25
concurrency.go
Normal file
25
concurrency.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package task
|
||||
|
||||
func (e *Executor) acquireConcurrencyLimit() func() {
|
||||
if e.concurrencySemaphore == nil {
|
||||
return emptyFunc
|
||||
}
|
||||
|
||||
e.concurrencySemaphore <- struct{}{}
|
||||
return func() {
|
||||
<-e.concurrencySemaphore
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Executor) releaseConcurrencyLimit() func() {
|
||||
if e.concurrencySemaphore == nil {
|
||||
return emptyFunc
|
||||
}
|
||||
|
||||
<-e.concurrencySemaphore
|
||||
return func() {
|
||||
e.concurrencySemaphore <- struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
func emptyFunc() {}
|
||||
20
docs/.gitignore
vendored
Normal file
20
docs/.gitignore
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
1
docs/.prettierignore
Normal file
1
docs/.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
docs/changelog.md
|
||||
@@ -1 +0,0 @@
|
||||
taskfile.dev
|
||||
@@ -1,59 +0,0 @@
|
||||
# Task
|
||||
|
||||
Task is a task runner / build tool that aims to be simpler and easier to use
|
||||
than, for example, [GNU Make][make].
|
||||
|
||||
Since it's written in [Go][go], Task is just a single binary and has no other
|
||||
dependencies, which means you don't need to mess with any complicated install
|
||||
setups just to use a build tool.
|
||||
|
||||
Once [installed](installation.md), you just need to describe your build tasks
|
||||
using a simple [YAML][yaml] schema in a file called `Taskfile.yml`:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
hello:
|
||||
cmds:
|
||||
- echo 'Hello World from Task!'
|
||||
silent: true
|
||||
```
|
||||
|
||||
And call it by running `task hello` from you terminal.
|
||||
|
||||
The above example is just the start, you can take a look at the [usage](usage.md)
|
||||
guide to check the full schema documentation and Task features.
|
||||
|
||||
## Features
|
||||
|
||||
- [Easy installation](installation.md): just download a single binary, add to
|
||||
$PATH and you're done! Or you can also install using [Homebrew][homebrew],
|
||||
[Snapcraft][snapcraft], or [Scoop][scoop] if you want;
|
||||
- Available on CIs: by adding [this simple command](installation.md#install-script)
|
||||
to install on your CI script and you're done to use Task as part of your CI pipeline;
|
||||
- Truly cross-platform: while most build tools only work well on Linux or macOS,
|
||||
Task also supports Windows thanks to [this awesome shell interpreter for Go][sh];
|
||||
- Great for code generation: you can easily [prevent a task from running](usage.md#prevent-unnecessary-work)
|
||||
if a given set of files haven't changed since last run (based either on its
|
||||
timestamp or content).
|
||||
|
||||
## Sponsors
|
||||
|
||||
[](https://opencollective.com/task)
|
||||
|
||||
## Backers
|
||||
|
||||
[](https://opencollective.com/task)
|
||||
|
||||
## Contributors
|
||||
|
||||
[](https://github.com/go-task/task/graphs/contributors)
|
||||
|
||||
[make]: https://www.gnu.org/software/make/
|
||||
[go]: https://golang.org/
|
||||
[yaml]: http://yaml.org/
|
||||
[homebrew]: https://brew.sh/
|
||||
[snapcraft]: https://snapcraft.io/
|
||||
[scoop]: https://scoop.sh/
|
||||
[sh]: https://mvdan.cc/sh
|
||||
@@ -1,12 +1,64 @@
|
||||
version: '2'
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
install:
|
||||
desc: Installs docsify to work the on the documentation site
|
||||
yarn:install:
|
||||
desc: Setup Docusaurus locally
|
||||
cmds:
|
||||
- npm install docsify-cli -g
|
||||
- yarn install
|
||||
sources:
|
||||
- package.json
|
||||
- yarn.lock
|
||||
|
||||
serve:
|
||||
desc: Serves the documentation site locally
|
||||
default:
|
||||
desc: Start website
|
||||
deps: [yarn:install]
|
||||
aliases: [s, start]
|
||||
vars:
|
||||
HOST: '{{default "0.0.0.0" .HOST}}'
|
||||
PORT: '{{default "3001" .PORT}}'
|
||||
cmds:
|
||||
- docsify serve docs
|
||||
- npx docusaurus start --no-open --host={{.HOST}} --port={{.PORT}}
|
||||
|
||||
build:
|
||||
desc: Build website
|
||||
deps: [yarn:install]
|
||||
cmds:
|
||||
- npx docusaurus build
|
||||
|
||||
preview:
|
||||
desc: Preview Website
|
||||
deps: [build]
|
||||
aliases: [serve]
|
||||
vars:
|
||||
HOST: '{{default "localhost" .HOST}}'
|
||||
PORT: '{{default "3001" .PORT}}'
|
||||
cmds:
|
||||
- npx docusaurus serve --no-open --host={{.HOST}} --port={{.PORT}}
|
||||
|
||||
clean:
|
||||
desc: Clean temp directories
|
||||
cmds:
|
||||
- rm -rf ./build
|
||||
|
||||
deploy:
|
||||
desc: Build and deploy Docusaurus
|
||||
summary: Requires GIT_USER and GIT_PASS envs to be previous set
|
||||
cmds:
|
||||
- npx docusaurus deploy
|
||||
|
||||
upgrade:
|
||||
desc: Upgrade Docusaurus
|
||||
cmds:
|
||||
- yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest
|
||||
|
||||
crowdin:push:
|
||||
desc: Upload source files to a Crowdin project
|
||||
deps: [yarn:install]
|
||||
cmds:
|
||||
- npx crowdin push
|
||||
|
||||
crowdin:pull:
|
||||
desc: Download latest translations from Crowdin to the specified place
|
||||
deps: [yarn:install]
|
||||
cmds:
|
||||
- npx crowdin pull --export-only-approved
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
- [Installation](installation.md)
|
||||
- [Usage](usage.md)
|
||||
- [Taskfile Versions](taskfile_versions.md)
|
||||
- [Examples](examples.md)
|
||||
- [Releasing Task](releasing_task.md)
|
||||
- [Alternative Task Runners](alternative_task_runners.md)
|
||||
- [Github](https://github.com/go-task/task)
|
||||
@@ -1,17 +0,0 @@
|
||||
# Alternative task runners
|
||||
|
||||
## YAML based
|
||||
|
||||
- [rliebz/tusk][tusk]
|
||||
|
||||
## Go based
|
||||
|
||||
- [magefile/mage][mage]
|
||||
|
||||
## Make similar
|
||||
|
||||
- [casey/just][just]
|
||||
|
||||
[tusk]: https://github.com/rliebz/tusk
|
||||
[mage]: https://github.com/magefile/mage
|
||||
[just]: https://github.com/casey/just
|
||||
3
docs/babel.config.js
Normal file
3
docs/babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
5
docs/blog/authors.yml
Normal file
5
docs/blog/authors.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
andreynering:
|
||||
name: Andrey Nering
|
||||
title: Maintainer of Task
|
||||
url: https://github.com/andreynering
|
||||
image_url: https://github.com/andreynering.png
|
||||
11
docs/constants.js
Normal file
11
docs/constants.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const GITHUB_URL = 'https://github.com/go-task/task';
|
||||
const TWITTER_URL = 'https://twitter.com/taskfiledev';
|
||||
const MASTODON_URL = 'https://fosstodon.org/@task';
|
||||
const DISCORD_URL = 'https://discord.gg/6TY36E39UK';
|
||||
|
||||
module.exports = {
|
||||
DISCORD_URL,
|
||||
GITHUB_URL,
|
||||
MASTODON_URL,
|
||||
TWITTER_URL
|
||||
};
|
||||
15
docs/crowdin.yml
Normal file
15
docs/crowdin.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
project_id: "574591"
|
||||
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||
preserve_hierarchy: true
|
||||
|
||||
files:
|
||||
- source: /docs/**/*
|
||||
translation: /i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%
|
||||
ignore:
|
||||
- /**/*.json
|
||||
|
||||
- source: /blog/**/*
|
||||
translation: /i18n/%locale%/docusaurus-plugin-content-blog/**/%original_file_name%
|
||||
|
||||
- source: /i18n/en/**/*.json
|
||||
translation: /i18n/%locale%/**/%original_file_name%
|
||||
324
docs/docs/api_reference.md
Normal file
324
docs/docs/api_reference.md
Normal file
@@ -0,0 +1,324 @@
|
||||
---
|
||||
slug: /api/
|
||||
sidebar_position: 4
|
||||
toc_min_heading_level: 2
|
||||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
# API Reference
|
||||
|
||||
## CLI
|
||||
|
||||
Task command line tool has the following syntax:
|
||||
|
||||
```bash
|
||||
task [--flags] [tasks...] [-- CLI_ARGS...]
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
If `--` is given, all remaning arguments will be assigned to a special
|
||||
`CLI_ARGS` variable
|
||||
|
||||
:::
|
||||
|
||||
| Short | Flag | Type | Default | Description |
|
||||
| ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
||||
| `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. |
|
||||
| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. |
|
||||
| `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. |
|
||||
| `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. |
|
||||
| `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. |
|
||||
| `-g` | `--global` | `bool` | `false` | Runs global Taskfile, from `$HOME/Taskfile.{yml,yaml}`. |
|
||||
| `-h` | `--help` | `bool` | `false` | Shows Task usage. |
|
||||
| `-i` | `--init` | `bool` | `false` | Creates a new Taskfile.yml in the current folder. |
|
||||
| `-I` | `--interval` | `string` | `5s` | Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
|
||||
| `-l` | `--list` | `bool` | `false` | Lists tasks with description of current Taskfile. |
|
||||
| `-a` | `--list-all` | `bool` | `false` | Lists tasks with or without a description. |
|
||||
| | `--sort` | `string` | `default` | Changes the order of the tasks when listed.<br />`default` - Alphanumeric with root tasks first<br />`alphanumeric` - Alphanumeric<br />`none` - No sorting (As they appear in the Taskfile) |
|
||||
| | `--json` | `bool` | `false` | See [JSON Output](#json-output) |
|
||||
| `-o` | `--output` | `string` | Default set in the Taskfile or `intervealed` | Sets output style: [`interleaved`/`group`/`prefixed`]. |
|
||||
| | `--output-group-begin` | `string` | | Message template to print before a task's grouped output. |
|
||||
| | `--output-group-end` | `string` | | Message template to print after a task's grouped output. |
|
||||
| | `--output-group-error-only` | `bool` | `false` | Swallow command output on zero exit code. |
|
||||
| `-p` | `--parallel` | `bool` | `false` | Executes tasks provided on command line in parallel. |
|
||||
| `-s` | `--silent` | `bool` | `false` | Disables echoing. |
|
||||
| `-y` | `--yes` | `bool` | `false` | Assume "yes" as answer to all prompts. |
|
||||
| | `--status` | `bool` | `false` | Exits with non-zero exit code if any of the given tasks is not up-to-date. |
|
||||
| | `--summary` | `bool` | `false` | Show summary about a task. |
|
||||
| `-t` | `--taskfile` | `string` | `Taskfile.yml` or `Taskfile.yaml` | |
|
||||
| `-v` | `--verbose` | `bool` | `false` | Enables verbose mode. |
|
||||
| | `--version` | `bool` | `false` | Show Task version. |
|
||||
| `-w` | `--watch` | `bool` | `false` | Enables watch of the given task. |
|
||||
|
||||
## Exit Codes
|
||||
|
||||
Task will sometimes exit with specific exit codes. These codes are split into
|
||||
three groups with the following ranges:
|
||||
|
||||
- General errors (0-99)
|
||||
- Taskfile errors (100-199)
|
||||
- Task errors (200-299)
|
||||
|
||||
A full list of the exit codes and their descriptions can be found below:
|
||||
|
||||
| Code | Description |
|
||||
| ---- | ------------------------------------------------------------ |
|
||||
| 0 | Success |
|
||||
| 1 | An unknown error occurred |
|
||||
| 100 | No Taskfile was found |
|
||||
| 101 | A Taskfile already exists when trying to initialize one |
|
||||
| 102 | The Taskfile is invalid or cannot be parsed |
|
||||
| 200 | The specified task could not be found |
|
||||
| 201 | An error occurred while executing a command inside of a task |
|
||||
| 202 | The user tried to invoke a task that is internal |
|
||||
| 203 | There a multiple tasks with the same name or alias |
|
||||
| 204 | A task was called too many times |
|
||||
| 205 | A task was cancelled by the user |
|
||||
|
||||
These codes can also be found in the repository in
|
||||
[`errors/errors.go`](https://github.com/go-task/task/blob/main/errors/errors.go).
|
||||
|
||||
:::info
|
||||
|
||||
When Task is run with the `-x`/`--exit-code` flag, the exit code of any failed
|
||||
commands will be passed through to the user instead.
|
||||
|
||||
:::
|
||||
|
||||
## JSON Output
|
||||
|
||||
When using the `--json` flag in combination with either the `--list` or
|
||||
`--list-all` flags, the output will be a JSON object with the following
|
||||
structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"name": "",
|
||||
"desc": "",
|
||||
"summary": "",
|
||||
"up_to_date": false,
|
||||
"location": {
|
||||
"line": 54,
|
||||
"column": 3,
|
||||
"taskfile": "/path/to/Taskfile.yml"
|
||||
}
|
||||
}
|
||||
// ...
|
||||
],
|
||||
"location": "/path/to/Taskfile.yml"
|
||||
}
|
||||
```
|
||||
|
||||
## Special Variables
|
||||
|
||||
There are some special variables that is available on the templating system:
|
||||
|
||||
| Var | Description |
|
||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `CLI_ARGS` | Contain all extra arguments passed after `--` when calling Task through the CLI. |
|
||||
| `TASK` | The name of the current task. |
|
||||
| `ROOT_DIR` | The absolute path of the root Taskfile. |
|
||||
| `TASKFILE_DIR` | The absolute path of the included Taskfile. |
|
||||
| `USER_WORKING_DIR` | The absolute path of the directory `task` was called from. |
|
||||
| `CHECKSUM` | The checksum of the files listed in `sources`. Only available within the `status` prop and if method is set to `checksum`. |
|
||||
| `TIMESTAMP` | The date object of the greatest timestamp of the files listes in `sources`. Only available within the `status` prop and if method is set to `timestamp`. |
|
||||
| `TASK_VERSION` | The current version of task. |
|
||||
|
||||
## ENV
|
||||
|
||||
Some environment variables can be overriden to adjust Task behavior.
|
||||
|
||||
| ENV | Default | Description |
|
||||
| -------------------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| `TASK_TEMP_DIR` | `.task` | Location of the temp dir. Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. |
|
||||
| `TASK_COLOR_RESET` | `0` | Color used for white. |
|
||||
| `TASK_COLOR_BLUE` | `34` | Color used for blue. |
|
||||
| `TASK_COLOR_GREEN` | `32` | Color used for green. |
|
||||
| `TASK_COLOR_CYAN` | `36` | Color used for cyan. |
|
||||
| `TASK_COLOR_YELLOW` | `33` | Color used for yellow. |
|
||||
| `TASK_COLOR_MAGENTA` | `35` | Color used for magenta. |
|
||||
| `TASK_COLOR_RED` | `31` | Color used for red. |
|
||||
| `FORCE_COLOR` | | Force color output usage. |
|
||||
|
||||
## Taskfile Schema
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| ---------- | ---------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `version` | `string` | | Version of the Taskfile. The current version is `3`. |
|
||||
| `output` | `string` | `interleaved` | Output mode. Available options: `interleaved`, `group` and `prefixed`. |
|
||||
| `method` | `string` | `checksum` | Default method in this Taskfile. Can be overriden in a task by task basis. Available options: `checksum`, `timestamp` and `none`. |
|
||||
| `includes` | [`map[string]Include`](#include) | | Additional Taskfiles to be included. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | A set of global variables. |
|
||||
| `env` | [`map[string]Variable`](#variable) | | A set of global environment variables. |
|
||||
| `tasks` | [`map[string]Task`](#task) | | A set of task definitions. |
|
||||
| `silent` | `bool` | `false` | Default 'silent' options for this Taskfile. If `false`, can be overidden with `true` in a task by task basis. |
|
||||
| `dotenv` | `[]string` | | A list of `.env` file paths to be parsed. |
|
||||
| `run` | `string` | `always` | Default 'run' option for this Taskfile. Available options: `always`, `once` and `when_changed`. |
|
||||
| `interval` | `string` | `5s` | Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
### Include
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| ---------- | --------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `taskfile` | `string` | | The path for the Taskfile or directory to be included. If a directory, Task will look for files named `Taskfile.yml` or `Taskfile.yaml` inside that directory. If a relative path, resolved relative to the directory containing the including Taskfile. |
|
||||
| `dir` | `string` | The parent Taskfile directory | The working directory of the included tasks when run. |
|
||||
| `optional` | `bool` | `false` | If `true`, no errors will be thrown if the specified file does not exist. |
|
||||
| `internal` | `bool` | `false` | Stops any task in the included Taskfile from being callable on the command line. These commands will also be omitted from the output when used with `--list`. |
|
||||
| `aliases` | `[]string` | | Alternative names for the namespace of the included Taskfile. |
|
||||
| `vars` | `map[string]Variable` | | A set of variables to apply to the included Taskfile. |
|
||||
|
||||
:::info
|
||||
|
||||
Informing only a string like below is equivalent to setting that value to the
|
||||
`taskfile` attribute.
|
||||
|
||||
```yaml
|
||||
includes:
|
||||
foo: ./path
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
### Variable
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | -------- | ------- | ------------------------------------------------------------------------ |
|
||||
| _itself_ | `string` | | A static value that will be set to the variable. |
|
||||
| `sh` | `string` | | A shell command. The output (`STDOUT`) will be assigned to the variable. |
|
||||
|
||||
:::info
|
||||
|
||||
Static and dynamic variables have different syntaxes, like below:
|
||||
|
||||
```yaml
|
||||
vars:
|
||||
STATIC: static
|
||||
DYNAMIC:
|
||||
sh: echo "dynamic"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
### Task
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------------- | ---------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cmds` | [`[]Command`](#command) | | A list of shell commands to be executed. |
|
||||
| `deps` | [`[]Dependency`](#dependency) | | A list of dependencies of this task. Tasks defined here will run in parallel before this task. |
|
||||
| `label` | `string` | | Overrides the name of the task in the output when a task is run. Supports variables. |
|
||||
| `desc` | `string` | | A short description of the task. This is displayed when calling `task --list`. |
|
||||
| `prompt` | `string` | | A prompt that will be presented before a task is run. Declining will cancel running the current and any subsequent tasks. |
|
||||
| `summary` | `string` | | A longer description of the task. This is displayed when calling `task --summary [task]`. |
|
||||
| `aliases` | `[]string` | | A list of alternative names by which the task can be called. |
|
||||
| `sources` | `[]string` | | A list of sources to check before running this task. Relevant for `checksum` and `timestamp` methods. Can be file paths or star globs. |
|
||||
| `generates` | `[]string` | | A list of files meant to be generated by this task. Relevant for `timestamp` method. Can be file paths or star globs. |
|
||||
| `status` | `[]string` | | A list of commands to check if this task should run. The task is skipped otherwise. This overrides `method`, `sources` and `generates`. |
|
||||
| `preconditions` | [`[]Precondition`](#precondition) | | A list of commands to check if this task should run. If a condition is not met, the task will error. |
|
||||
| `dir` | `string` | | The directory in which this task should run. Defaults to the current working directory. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | A set of variables that can be used in the task. |
|
||||
| `env` | [`map[string]Variable`](#variable) | | A set of environment variables that will be made available to shell commands. |
|
||||
| `dotenv` | `[]string` | | A list of `.env` file paths to be parsed. |
|
||||
| `silent` | `bool` | `false` | Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`. When combined with the `--list` flag, task descriptions will be hidden. |
|
||||
| `interactive` | `bool` | `false` | Tells task that the command is interactive. |
|
||||
| `internal` | `bool` | `false` | Stops a task from being callable on the command line. It will also be omitted from the output when used with `--list`. |
|
||||
| `method` | `string` | `checksum` | Defines which method is used to check the task is up-to-date. `timestamp` will compare the timestamp of the sources and generates files. `checksum` will check the checksum (You probably want to ignore the .task folder in your .gitignore file). `none` skips any validation and always run the task. |
|
||||
| `prefix` | `string` | | Defines a string to prefix the output of tasks running in parallel. Only used when the output mode is `prefixed`. |
|
||||
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing commands. |
|
||||
| `run` | `string` | The one declared globally in the Taskfile or `always` | Specifies whether the task should run again or not if called more than once. Available options: `always`, `once` and `when_changed`. |
|
||||
| `platforms` | `[]string` | All platforms | Specifies which platforms the task should be run on. [Valid GOOS and GOARCH values allowed](https://github.com/golang/go/blob/main/src/go/build/syslist.go). Task will be skipped otherwise. |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
:::info
|
||||
|
||||
These alternative syntaxes are available. They will set the given values to
|
||||
`cmds` and everything else will be set to their default values:
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo: echo "foo"
|
||||
|
||||
foobar:
|
||||
- echo "foo"
|
||||
- echo "bar"
|
||||
|
||||
baz:
|
||||
cmd: echo "baz"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
#### Command
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| -------------- | ---------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cmd` | `string` | | The shell command to be executed. |
|
||||
| `silent` | `bool` | `false` | Skips some output for this command. Note that STDOUT and STDERR of the commands will still be redirected. |
|
||||
| `task` | `string` | | Set this to trigger execution of another task instead of running a command. This cannot be set together with `cmd`. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to the referenced task. Only relevant when setting `task` instead of `cmd`. |
|
||||
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing the command. |
|
||||
| `defer` | `string` | | Alternative to `cmd`, but schedules the command to be executed at the end of this task instead of immediately. This cannot be used together with `cmd`. |
|
||||
| `platforms` | `[]string` | All platforms | Specifies which platforms the command should be run on. [Valid GOOS and GOARCH values allowed](https://github.com/golang/go/blob/main/src/go/build/syslist.go). Command will be skipped otherwise. |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
:::info
|
||||
|
||||
If given as a a string, the value will be assigned to `cmd`:
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo "foo"
|
||||
- echo "bar"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
#### Dependency
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | ---------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `task` | `string` | | The task to be execute as a dependency. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to this task. |
|
||||
| `silent` | `bool` | `false` | Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`. |
|
||||
|
||||
:::tip
|
||||
|
||||
If you don't want to set additional variables, it's enough to declare the
|
||||
dependency as a list of strings (they will be assigned to `task`):
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo:
|
||||
deps: [foo, bar]
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
#### Precondition
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `sh` | `string` | | Command to be executed. If a non-zero exit code is returned, the task errors without executing its commands. |
|
||||
| `msg` | `string` | | Optional message to print if the precondition isn't met. |
|
||||
|
||||
:::tip
|
||||
|
||||
If you don't want to set a different message, you can declare a precondition
|
||||
like this and the value will be assigned to `sh`:
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo:
|
||||
precondition: test -f Taskfile.yml
|
||||
```
|
||||
|
||||
:::
|
||||
688
docs/docs/changelog.md
Normal file
688
docs/docs/changelog.md
Normal file
@@ -0,0 +1,688 @@
|
||||
---
|
||||
slug: /changelog/
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Changelog
|
||||
|
||||
## v3.26.0 = 2023-06-10
|
||||
|
||||
- Only rewrite checksum files in `.task` if the checksum has changed ([#1185](https://github.com/go-task/task/issues/1185),
|
||||
[#1194](https://github.com/go-task/task/issues/1194) by [@deviantintegral](https://github.com/deviantintegral)).
|
||||
- Added [experiments documentation](https://taskfile.dev/experiments) to the
|
||||
website ([#1198](https://github.com/go-task/task/issues/1198) by [@pd93](https://github.com/pd93)).
|
||||
- Deprecated `version: 2` schema. This will be removed in the next major release
|
||||
([#1197](https://github.com/go-task/task/issues/1197), [#1198](https://github.com/go-task/task/issues/1198), [#1199](https://github.com/go-task/task/issues/1199) by [@pd93](https://github.com/pd93)).
|
||||
- Added a new `prompt:` prop to set a warning prompt to be shown before running
|
||||
a potential dangurous task ([#100](https://github.com/go-task/task/issues/100), [#1163](https://github.com/go-task/task/issues/1163) by [@MaxCheetham](https://github.com/MaxCheetham),
|
||||
[Documentation](https://taskfile.dev/usage/#warning-prompts)).
|
||||
- Added support for single command task syntax. With this change, it's now
|
||||
possible to declare just `cmd:` in a task, avoiding the more complex
|
||||
`cmds: []` when you have only a single command for that task
|
||||
([#1130](https://github.com/go-task/task/issues/1130), [#1131](https://github.com/go-task/task/issues/1131) by [@timdp](https://github.com/timdp)).
|
||||
|
||||
## v3.25.0 - 2023-05-22
|
||||
|
||||
- Support `silent:` when calling another tasks ([#680](https://github.com/go-task/task/issues/680), [#1142](https://github.com/go-task/task/issues/1142) by [@danquah](https://github.com/danquah)).
|
||||
- Improve PowerShell completion script ([#1168](https://github.com/go-task/task/issues/1168) by [@trim21](https://github.com/trim21)).
|
||||
- Add more languages to the website menu and show translation progress
|
||||
percentage ([#1173](https://github.com/go-task/task/issues/1173) by [@misitebao](https://github.com/misitebao)).
|
||||
- Starting on this release, official binaries for FreeBSD will be available to
|
||||
download ([#1068](https://github.com/go-task/task/issues/1068) by [@andreynering](https://github.com/andreynering)).
|
||||
- Fix some errors being unintendedly supressed ([#1134](https://github.com/go-task/task/issues/1134) by [@clintmod](https://github.com/clintmod)).
|
||||
- Fix a nil pointer error when `version` is omitted from a Taskfile ([#1148](https://github.com/go-task/task/issues/1148),
|
||||
[#1149](https://github.com/go-task/task/issues/1149) by [@pd93](https://github.com/pd93)).
|
||||
- Fix duplicate error message when a task does not exists ([#1141](https://github.com/go-task/task/issues/1141), [#1144](https://github.com/go-task/task/issues/1144) by
|
||||
[@pd93](https://github.com/pd93)).
|
||||
|
||||
## v3.24.0 - 2023-04-15
|
||||
|
||||
- Fix Fish shell completion for tasks with aliases ([#1113](https://github.com/go-task/task/issues/1113) by [@patricksjackson](https://github.com/patricksjackson)).
|
||||
- The default branch was renamed from `master` to `main` ([#1049](https://github.com/go-task/task/issues/1049), [#1048](https://github.com/go-task/task/issues/1048) by
|
||||
[@pd93](https://github.com/pd93)).
|
||||
- Fix bug where "up-to-date" logs were not being omitted for silent tasks ([#546](https://github.com/go-task/task/issues/546),
|
||||
[#1107](https://github.com/go-task/task/issues/1107) by [@danquah](https://github.com/danquah)).
|
||||
- Add `.hg` (Mercurial) to the list of ignored directories when using `--watch`
|
||||
([#1098](https://github.com/go-task/task/issues/1098) by [@misery](https://github.com/misery)).
|
||||
- More improvements to the release tool ([#1096](https://github.com/go-task/task/issues/1096) by [@pd93](https://github.com/pd93)).
|
||||
- Enforce [gofumpt](https://github.com/mvdan/gofumpt) linter ([#1099](https://github.com/go-task/task/issues/1099) by [@pd93](https://github.com/pd93))
|
||||
- Add `--sort` flag for use with `--list` and `--list-all` ([#946](https://github.com/go-task/task/issues/946), [#1105](https://github.com/go-task/task/issues/1105) by
|
||||
[@pd93](https://github.com/pd93)).
|
||||
- Task now has [custom exit codes](https://taskfile.dev/api/#exit-codes)
|
||||
depending on the error ([#1114](https://github.com/go-task/task/issues/1114) by [@pd93](https://github.com/pd93)).
|
||||
|
||||
## v3.23.0 - 2023-03-26
|
||||
|
||||
Task now has an
|
||||
[official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task)
|
||||
contributed by [@pd93](https://github.com/pd93)! :tada: The extension is maintained in a
|
||||
[new repository](https://github.com/go-task/vscode-task) 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](https://github.com/go-task/vscode-task/discussions),
|
||||
[issue](https://github.com/go-task/vscode-task/issues) or on our
|
||||
[Discord](https://discord.gg/6TY36E39UK)!
|
||||
|
||||
> **NOTE:** The extension _requires_ v3.23.0 to be installed in order to work.
|
||||
|
||||
- The website was integrated with
|
||||
[Crowdin](https://crowdin.com/project/taskfile) to allow the community to
|
||||
contribute with translations! [Chinese](https://taskfile.dev/zh-Hans/) is the
|
||||
first language available ([#1057](https://github.com/go-task/task/issues/1057), [#1058](https://github.com/go-task/task/issues/1058) by [@misitebao](https://github.com/misitebao)).
|
||||
- Added task location data to the `--json` flag output ([#1056](https://github.com/go-task/task/issues/1056) by [@pd93](https://github.com/pd93))
|
||||
- Change the name of the file generated by `task --init` from `Taskfile.yaml` to
|
||||
`Taskfile.yml` ([#1062](https://github.com/go-task/task/issues/1062) by [@misitebao](https://github.com/misitebao)).
|
||||
- Added new `splitArgs` template function
|
||||
(`{{splitArgs "foo bar 'foo bar baz'"}}`) to ensure string is split as
|
||||
arguments ([#1040](https://github.com/go-task/task/issues/1040), [#1059](https://github.com/go-task/task/issues/1059) by [@dhanusaputra](https://github.com/dhanusaputra)).
|
||||
- Fix the value of `{{.CHECKSUM}}` variable in status ([#1076](https://github.com/go-task/task/issues/1076), [#1080](https://github.com/go-task/task/issues/1080) by [@pd93](https://github.com/pd93)).
|
||||
- Fixed deep copy implementation ([#1072](https://github.com/go-task/task/issues/1072) by [@pd93](https://github.com/pd93))
|
||||
- Created a tool to assist with releases ([#1086](https://github.com/go-task/task/issues/1086) by [@pd93](https://github.com/pd93)).
|
||||
|
||||
## v3.22.0 - 2023-03-10
|
||||
|
||||
- Add a brand new `--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](https://taskfile.dev/usage/#running-a-global-taskfile), [#1029](https://github.com/go-task/task/issues/1029)
|
||||
by [@andreynering](https://github.com/andreynering)).
|
||||
- Add ability to set `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](https://github.com/go-task/task/issues/664), [#1022](https://github.com/go-task/task/issues/1022) by [@jaedle](https://github.com/jaedle)).
|
||||
- Fixed bug where `.task/checksum` file was sometimes not being created when
|
||||
task also declares a `status:` ([#840](https://github.com/go-task/task/issues/840), [#1035](https://github.com/go-task/task/issues/1035) by [@harelwa](https://github.com/harelwa), [#1037](https://github.com/go-task/task/issues/1037) by [@pd93](https://github.com/pd93)).
|
||||
- Refactored and decoupled fingerprinting from the main Task executor ([#1039](https://github.com/go-task/task/issues/1039) by
|
||||
[@pd93](https://github.com/pd93)).
|
||||
- Fixed deadlock issue when using `run: once` ([#715](https://github.com/go-task/task/issues/715), [#1025](https://github.com/go-task/task/issues/1025) by
|
||||
[@theunrepentantgeek](https://github.com/theunrepentantgeek)).
|
||||
|
||||
## v3.21.0 - 2023-02-22
|
||||
|
||||
- Added new `TASK_VERSION` special variable ([#990](https://github.com/go-task/task/issues/990), [#1014](https://github.com/go-task/task/issues/1014) by [@ja1code](https://github.com/ja1code)).
|
||||
- Fixed a bug where tasks were sometimes incorrectly marked as internal ([#1007](https://github.com/go-task/task/issues/1007)
|
||||
by [@pd93](https://github.com/pd93)).
|
||||
- Update to Go 1.20 (bump minimum version to 1.19) ([#1010](https://github.com/go-task/task/issues/1010) by [@pd93](https://github.com/pd93))
|
||||
- Added environment variable `FORCE_COLOR` support to force color output.
|
||||
Usefull for environments without TTY ([#1003](https://github.com/go-task/task/issues/1003) by [@automation](https://github.com/automation)-stack)
|
||||
|
||||
## v3.20.0 - 2023-01-14
|
||||
|
||||
- Improve behavior and performance of status checking when using the `timestamp`
|
||||
mode ([#976](https://github.com/go-task/task/issues/976), [#977](https://github.com/go-task/task/issues/977) by [@aminya](https://github.com/aminya)).
|
||||
- Performance optimizations were made for large Taskfiles ([#982](https://github.com/go-task/task/issues/982) by [@pd93](https://github.com/pd93)).
|
||||
- Add ability to configure options for the
|
||||
[`set`](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html)
|
||||
and
|
||||
[`shopt`](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html)
|
||||
builtins ([#908](https://github.com/go-task/task/issues/908), [#929](https://github.com/go-task/task/issues/929) by [@pd93](https://github.com/pd93),
|
||||
[Documentation](http://taskfile.dev/usage/#set-and-shopt)).
|
||||
- Add new `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](https://github.com/go-task/task/issues/978), [#980](https://github.com/go-task/task/issues/980) by
|
||||
[@leaanthony](https://github.com/leaanthony)).
|
||||
|
||||
## v3.19.1 - 2022-12-31
|
||||
|
||||
- Small bug fix: closing `Taskfile.yml` once we're done reading it ([#963](https://github.com/go-task/task/issues/963), [#964](https://github.com/go-task/task/issues/964)
|
||||
by [@HeCorr](https://github.com/HeCorr)).
|
||||
- Fixes a bug in v2 that caused a panic when using a `Taskfile_{{OS}}.yml` file
|
||||
([#961](https://github.com/go-task/task/issues/961), [#971](https://github.com/go-task/task/issues/971) by [@pd93](https://github.com/pd93)).
|
||||
- Fixed a bug where watch intervals set in the Taskfile were not being respected
|
||||
([#969](https://github.com/go-task/task/issues/969), [#970](https://github.com/go-task/task/issues/970) by [@pd93](https://github.com/pd93))
|
||||
- Add `--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](https://github.com/go-task/task/issues/936) by [@davidalpert](https://github.com/davidalpert), [#764](https://github.com/go-task/task/issues/764)).
|
||||
|
||||
## v3.19.0 - 2022-12-05
|
||||
|
||||
- Installation via npm now supports [pnpm](https://pnpm.io/) as well
|
||||
([go-task/go-npm[#2](https://github.com/go-task/task/issues/2)](https://github.com/go-task/go-npm/issues/2),
|
||||
[go-task/go-npm[#3](https://github.com/go-task/task/issues/3)](https://github.com/go-task/go-npm/pull/3)).
|
||||
- It's now possible to run Taskfiles from subdirectories! A new
|
||||
`USER_WORKING_DIR` special variable was added to add even more flexibility for
|
||||
monorepos ([#289](https://github.com/go-task/task/issues/289), [#920](https://github.com/go-task/task/issues/920)).
|
||||
- Add task-level `dotenv` support ([#389](https://github.com/go-task/task/issues/389), [#904](https://github.com/go-task/task/issues/904)).
|
||||
- It's now possible to use global level variables on `includes` ([#942](https://github.com/go-task/task/issues/942), [#943](https://github.com/go-task/task/issues/943)).
|
||||
- The website got a brand new
|
||||
[translation to Chinese](https://task-zh.readthedocs.io/zh_CN/latest/) by
|
||||
[[@DeronW](https://github.com/DeronW)](https://github.com/DeronW). Thanks!
|
||||
|
||||
## v3.18.0 - 2022-11-12
|
||||
|
||||
- Show aliases on `task --list --silent` (`task --ls`). This means that aliases
|
||||
will be completed by the completion scripts ([#919](https://github.com/go-task/task/issues/919)).
|
||||
- Tasks in the root Taskfile will now be displayed first in
|
||||
`--list`/`--list-all` output ([#806](https://github.com/go-task/task/issues/806), [#890](https://github.com/go-task/task/issues/890)).
|
||||
- It's now possible to call a `default` task in an included Taskfile by using
|
||||
just the namespace. For example: `docs:default` is now automatically aliased
|
||||
to `docs` ([#661](https://github.com/go-task/task/issues/661), [#815](https://github.com/go-task/task/issues/815)).
|
||||
|
||||
## v3.17.0 - 2022-10-14
|
||||
|
||||
- Add a "Did you mean ...?" suggestion when a task does not exits another one
|
||||
with a similar name is found ([#867](https://github.com/go-task/task/issues/867), [#880](https://github.com/go-task/task/issues/880)).
|
||||
- Now YAML parse errors will print which Taskfile failed to parse ([#885](https://github.com/go-task/task/issues/885), [#887](https://github.com/go-task/task/issues/887)).
|
||||
- Add ability to set `aliases` for tasks and namespaces ([#268](https://github.com/go-task/task/issues/268), [#340](https://github.com/go-task/task/issues/340), [#879](https://github.com/go-task/task/issues/879)).
|
||||
- Improvements to Fish shell completion ([#897](https://github.com/go-task/task/issues/897)).
|
||||
- Added ability to set a different watch interval by setting `interval: '500ms'`
|
||||
or using the `--interval=500ms` flag ([#813](https://github.com/go-task/task/issues/813), [#865](https://github.com/go-task/task/issues/865)).
|
||||
- Add colored output to `--list`, `--list-all` and `--summary` flags ([#845](https://github.com/go-task/task/issues/845),
|
||||
[#874](https://github.com/go-task/task/issues/874)).
|
||||
- Fix unexpected behavior where `label:` was being shown instead of the task
|
||||
name on `--list` ([#603](https://github.com/go-task/task/issues/603), [#877](https://github.com/go-task/task/issues/877)).
|
||||
|
||||
## v3.16.0 - 2022-09-29
|
||||
|
||||
- Add `npm` as new installation method: `npm i -g [@go](https://github.com/go)-task/cli` ([#870](https://github.com/go-task/task/issues/870), [#871](https://github.com/go-task/task/issues/871),
|
||||
[npm package](https://www.npmjs.com/package/[@go](https://github.com/go)-task/cli)).
|
||||
- Add support to marking tasks and includes as internal, which will hide them
|
||||
from `--list` and `--list-all` ([#818](https://github.com/go-task/task/issues/818)).
|
||||
|
||||
## v3.15.2 - 2022-09-08
|
||||
|
||||
- Fix error when using variable in `env:` introduced in the previous release
|
||||
([#858](https://github.com/go-task/task/issues/858), [#866](https://github.com/go-task/task/issues/866)).
|
||||
- Fix handling of `CLI_ARGS` (`--`) in Bash completion ([#863](https://github.com/go-task/task/issues/863)).
|
||||
- On zsh completion, add ability to replace `--list-all` with `--list` as
|
||||
already possible on the Bash completion ([#861](https://github.com/go-task/task/issues/861)).
|
||||
|
||||
## v3.15.0 - 2022-09-03
|
||||
|
||||
- Add new special variables `ROOT_DIR` and `TASKFILE_DIR`. This was a highly
|
||||
requested feature ([#215](https://github.com/go-task/task/issues/215), [#857](https://github.com/go-task/task/issues/857),
|
||||
[Documentation](https://taskfile.dev/api/#special-variables)).
|
||||
- Follow symlinks on `sources` ([#826](https://github.com/go-task/task/issues/826), [#831](https://github.com/go-task/task/issues/831)).
|
||||
- Improvements and fixes to Bash completion ([#835](https://github.com/go-task/task/issues/835), [#844](https://github.com/go-task/task/issues/844)).
|
||||
|
||||
## v3.14.1 - 2022-08-03
|
||||
|
||||
- Always resolve relative include paths relative to the including Taskfile
|
||||
([#822](https://github.com/go-task/task/issues/822), [#823](https://github.com/go-task/task/issues/823)).
|
||||
- Fix ZSH and PowerShell completions to consider all tasks instead of just the
|
||||
public ones (those with descriptions) ([#803](https://github.com/go-task/task/issues/803)).
|
||||
|
||||
## v3.14.0 - 2022-07-08
|
||||
|
||||
- Add ability to override the `.task` directory location with the
|
||||
`TASK_TEMP_DIR` environment variable.
|
||||
- Allow to override Task colors using environment variables: `TASK_COLOR_RESET`,
|
||||
`TASK_COLOR_BLUE`, `TASK_COLOR_GREEN`, `TASK_COLOR_CYAN`, `TASK_COLOR_YELLOW`,
|
||||
`TASK_COLOR_MAGENTA` and `TASK_COLOR_RED` ([#568](https://github.com/go-task/task/issues/568), [#792](https://github.com/go-task/task/issues/792)).
|
||||
- Fixed bug when using the `output: group` mode where STDOUT and STDERR were
|
||||
being print in separated blocks instead of in the right order ([#779](https://github.com/go-task/task/issues/779)).
|
||||
- Starting on this release, ARM architecture binaries are been released to Snap
|
||||
as well ([#795](https://github.com/go-task/task/issues/795)).
|
||||
- i386 binaries won't be available anymore on Snap because Ubuntu removed the
|
||||
support for this architecture.
|
||||
- Upgrade mvdan.cc/sh, which fixes a bug with associative arrays ([#785](https://github.com/go-task/task/issues/785),
|
||||
[mvdan/sh[#884](https://github.com/go-task/task/issues/884)](https://github.com/mvdan/sh/issues/884),
|
||||
[mvdan/sh[#893](https://github.com/go-task/task/issues/893)](https://github.com/mvdan/sh/pull/893)).
|
||||
|
||||
## v3.13.0 - 2022-06-13
|
||||
|
||||
- Added `-n` as an alias to `--dry` ([#776](https://github.com/go-task/task/issues/776), [#777](https://github.com/go-task/task/issues/777)).
|
||||
- Fix behavior of interrupt (SIGINT, SIGTERM) signals. Task will now give time
|
||||
for the processes running to do cleanup work ([#458](https://github.com/go-task/task/issues/458), [#479](https://github.com/go-task/task/issues/479), [#728](https://github.com/go-task/task/issues/728), [#769](https://github.com/go-task/task/issues/769)).
|
||||
- Add new `--exit-code` (`-x`) flag that will pass-through the exit form the
|
||||
command being ran ([#755](https://github.com/go-task/task/issues/755)).
|
||||
|
||||
## v3.12.1 - 2022-05-10
|
||||
|
||||
- Fixed bug where, on Windows, variables were ending with `\r` because we were
|
||||
only removing the final `\n` but not `\r\n` ([#717](https://github.com/go-task/task/issues/717)).
|
||||
|
||||
## v3.12.0 - 2022-03-31
|
||||
|
||||
- The `--list` and `--list-all` flags can now be combined with the `--silent`
|
||||
flag to print the task names only, without their description ([#691](https://github.com/go-task/task/issues/691)).
|
||||
- Added support for multi-level inclusion of Taskfiles. This means that included
|
||||
Taskfiles can also include other Taskfiles. Before this was limited to one
|
||||
level ([#390](https://github.com/go-task/task/issues/390), [#623](https://github.com/go-task/task/issues/623), [#656](https://github.com/go-task/task/issues/656)).
|
||||
- Add ability to specify vars when including a Taskfile.
|
||||
[Check out the documentation](https://taskfile.dev/#/usage?id=vars-of-included-taskfiles)
|
||||
for more information ([#677](https://github.com/go-task/task/issues/677)).
|
||||
|
||||
## v3.11.0 - 2022-02-19
|
||||
|
||||
- Task now supports printing begin and end messages when using the `group`
|
||||
output mode, useful for grouping tasks in CI systems.
|
||||
[Check out the documentation](http://taskfile.dev/#/usage?id=output-syntax)
|
||||
for more information ([#647](https://github.com/go-task/task/issues/647), [#651](https://github.com/go-task/task/issues/651)).
|
||||
- Add `Taskfile.dist.yml` and `Taskfile.dist.yaml` to the supported file name
|
||||
list.
|
||||
[Check out the documentation](https://taskfile.dev/#/usage?id=supported-file-names)
|
||||
for more information ([#498](https://github.com/go-task/task/issues/498), [#666](https://github.com/go-task/task/issues/666)).
|
||||
|
||||
## v3.10.0 - 2022-01-04
|
||||
|
||||
- A new `--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](https://github.com/go-task/task/issues/383), [#401](https://github.com/go-task/task/issues/401)).
|
||||
- It's now possible to schedule cleanup commands to run once a task finishes
|
||||
with the `defer:` keyword
|
||||
([Documentation](https://taskfile.dev/#/usage?id=doing-task-cleanup-with-defer),
|
||||
[#475](https://github.com/go-task/task/issues/475), [#626](https://github.com/go-task/task/issues/626)).
|
||||
- Remove long deprecated and undocumented `$` variable prefix and `^` command
|
||||
prefix ([#642](https://github.com/go-task/task/issues/642), [#644](https://github.com/go-task/task/issues/644), [#645](https://github.com/go-task/task/issues/645)).
|
||||
- Add support for `.yaml` extension (as an alternative to `.yml`). This was
|
||||
requested multiple times throughout the years. Enjoy! ([#183](https://github.com/go-task/task/issues/183), [#184](https://github.com/go-task/task/issues/184), [#369](https://github.com/go-task/task/issues/369), [#584](https://github.com/go-task/task/issues/584),
|
||||
[#621](https://github.com/go-task/task/issues/621)).
|
||||
- Fixed error when computing a variable when the task directory do not exist yet
|
||||
([#481](https://github.com/go-task/task/issues/481), [#579](https://github.com/go-task/task/issues/579)).
|
||||
|
||||
## v3.9.2 - 2021-12-02
|
||||
|
||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains a fix a for a
|
||||
important regression on Windows ([#619](https://github.com/go-task/task/issues/619),
|
||||
[mvdan/sh[#768](https://github.com/go-task/task/issues/768)](https://github.com/mvdan/sh/issues/768),
|
||||
[mvdan/sh[#769](https://github.com/go-task/task/issues/769)](https://github.com/mvdan/sh/pull/769)).
|
||||
|
||||
## v3.9.1 - 2021-11-28
|
||||
|
||||
- Add logging in verbose mode for when a task starts and finishes ([#533](https://github.com/go-task/task/issues/533), [#588](https://github.com/go-task/task/issues/588)).
|
||||
- Fix an issue with preconditions and context errors ([#597](https://github.com/go-task/task/issues/597), [#598](https://github.com/go-task/task/issues/598)).
|
||||
- Quote each `{{.CLI_ARGS}}` argument to prevent one with spaces to become many
|
||||
([#613](https://github.com/go-task/task/issues/613)).
|
||||
- Fix nil pointer when `cmd:` was left empty ([#612](https://github.com/go-task/task/issues/612), [#614](https://github.com/go-task/task/issues/614)).
|
||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains two relevant
|
||||
fixes:
|
||||
- Fix quote of empty strings in `shellQuote` ([#609](https://github.com/go-task/task/issues/609),
|
||||
[mvdan/sh[#763](https://github.com/go-task/task/issues/763)](https://github.com/mvdan/sh/issues/763)).
|
||||
- Fix issue of wrong environment variable being picked when there's another
|
||||
very similar one ([#586](https://github.com/go-task/task/issues/586),
|
||||
[mvdan/sh[#745](https://github.com/go-task/task/issues/745)](https://github.com/mvdan/sh/pull/745)).
|
||||
- Install shell completions automatically when installing via Homebrew ([#264](https://github.com/go-task/task/issues/264),
|
||||
[#592](https://github.com/go-task/task/issues/592),
|
||||
[go-task/homebrew-tap[#2](https://github.com/go-task/task/issues/2)](https://github.com/go-task/homebrew-tap/pull/2)).
|
||||
|
||||
## v3.9.0 - 2021-10-02
|
||||
|
||||
- A new `shellQuote` function was added to the template system
|
||||
(`{{shellQuote "a string"}}`) to ensure a string is safe for use in shell
|
||||
([mvdan/sh[#727](https://github.com/go-task/task/issues/727)](https://github.com/mvdan/sh/pull/727),
|
||||
[mvdan/sh[#737](https://github.com/go-task/task/issues/737)](https://github.com/mvdan/sh/pull/737),
|
||||
[Documentation](https://pkg.go.dev/mvdan.cc/sh/v3[@v3](https://github.com/v3).4.0/syntax#Quote))
|
||||
- In this version [mvdan.cc/sh](https://github.com/mvdan/sh) was upgraded with
|
||||
some small fixes and features
|
||||
- The `read -p` flag is now supported ([#314](https://github.com/go-task/task/issues/314),
|
||||
[mvdan/sh[#551](https://github.com/go-task/task/issues/551)](https://github.com/mvdan/sh/issues/551),
|
||||
[mvdan/sh[#772](https://github.com/go-task/task/issues/772)](https://github.com/mvdan/sh/pull/722))
|
||||
- The `pwd -P` and `pwd -L` flags are now supported ([#553](https://github.com/go-task/task/issues/553),
|
||||
[mvdan/sh[#724](https://github.com/go-task/task/issues/724)](https://github.com/mvdan/sh/issues/724),
|
||||
[mvdan/sh[#728](https://github.com/go-task/task/issues/728)](https://github.com/mvdan/sh/pull/728))
|
||||
- The `$GID` environment variable is now correctly being set ([#561](https://github.com/go-task/task/issues/561),
|
||||
[mvdan/sh[#723](https://github.com/go-task/task/issues/723)](https://github.com/mvdan/sh/pull/723))
|
||||
|
||||
## v3.8.0 - 2021-09-26
|
||||
|
||||
- Add `interactive: true` setting to improve support for interactive CLI apps
|
||||
([#217](https://github.com/go-task/task/issues/217), [#563](https://github.com/go-task/task/issues/563)).
|
||||
- Fix some `nil` errors ([#534](https://github.com/go-task/task/issues/534), [#573](https://github.com/go-task/task/issues/573)).
|
||||
- Add ability to declare an included Taskfile as optional ([#519](https://github.com/go-task/task/issues/519), [#552](https://github.com/go-task/task/issues/552)).
|
||||
- Add support for including Taskfiles in the home directory by using `~` ([#539](https://github.com/go-task/task/issues/539),
|
||||
[#557](https://github.com/go-task/task/issues/557)).
|
||||
|
||||
## v3.7.3 - 2021-09-04
|
||||
|
||||
- Add official support to Apple M1 ([#564](https://github.com/go-task/task/issues/564), [#567](https://github.com/go-task/task/issues/567)).
|
||||
- Our [official Homebrew tap](https://github.com/go-task/homebrew-tap) will
|
||||
support more platforms, including Apple M1
|
||||
|
||||
## v3.7.0 - 2021-07-31
|
||||
|
||||
- Add `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](https://github.com/go-task/task/issues/53), [#359](https://github.com/go-task/task/issues/359)).
|
||||
|
||||
## v3.6.0 - 2021-07-10
|
||||
|
||||
- Allow using both `sources:` and `status:` in the same task ([#411](https://github.com/go-task/task/issues/411), [#427](https://github.com/go-task/task/issues/427), [#477](https://github.com/go-task/task/issues/477)).
|
||||
- Small optimization and bug fix: don't compute variables if not needed for
|
||||
`dotenv:` ([#517](https://github.com/go-task/task/issues/517)).
|
||||
|
||||
## v3.5.0 - 2021-07-04
|
||||
|
||||
- Add support for interpolation in `dotenv:` ([#433](https://github.com/go-task/task/issues/433), [#434](https://github.com/go-task/task/issues/434), [#453](https://github.com/go-task/task/issues/453)).
|
||||
|
||||
## v3.4.3 - 2021-05-30
|
||||
|
||||
- Add support for the `NO_COLOR` environment variable. ([#459](https://github.com/go-task/task/issues/459),
|
||||
[fatih/color[#137](https://github.com/go-task/task/issues/137)](https://github.com/fatih/color/pull/137)).
|
||||
- Fix bug where sources were not considering the right directory in `--watch`
|
||||
mode ([#484](https://github.com/go-task/task/issues/484), [#485](https://github.com/go-task/task/issues/485)).
|
||||
|
||||
## v3.4.2 - 2021-04-23
|
||||
|
||||
- On watch, report which file failed to read ([#472](https://github.com/go-task/task/issues/472)).
|
||||
- Do not try to catch SIGKILL signal, which are not actually possible ([#476](https://github.com/go-task/task/issues/476)).
|
||||
- Improve version reporting when building Task from source using Go Modules
|
||||
([#462](https://github.com/go-task/task/issues/462), [#473](https://github.com/go-task/task/issues/473)).
|
||||
|
||||
## v3.4.1 - 2021-04-17
|
||||
|
||||
- Improve error reporting when parsing YAML: in some situations where you would
|
||||
just see an generic error, you'll now see the actual error with more detail:
|
||||
the YAML line the failed to parse, for example ([#467](https://github.com/go-task/task/issues/467)).
|
||||
- A JSON Schema was published [here](https://json.schemastore.org/taskfile.json)
|
||||
and is automatically being used by some editors like Visual Studio Code
|
||||
([#135](https://github.com/go-task/task/issues/135)).
|
||||
- Print task name before the command in the log output ([#398](https://github.com/go-task/task/issues/398)).
|
||||
|
||||
## v3.3.0 - 2021-03-20
|
||||
|
||||
- Add support for delegating CLI arguments to commands with `--` and a special
|
||||
`CLI_ARGS` variable ([#327](https://github.com/go-task/task/issues/327)).
|
||||
- Add a `--concurrency` (alias `-C`) flag, to limit the number of tasks that run
|
||||
concurrently. This is useful for heavy workloads. ([#345](https://github.com/go-task/task/issues/345)).
|
||||
|
||||
## v3.2.2 - 2021-01-12
|
||||
|
||||
- Improve performance of `--list` and `--summary` by skipping running shell
|
||||
variables for these flags ([#332](https://github.com/go-task/task/issues/332)).
|
||||
- Fixed a bug where an environment in a Taskfile was not always overridable by
|
||||
the system environment ([#425](https://github.com/go-task/task/issues/425)).
|
||||
- Fixed environment from .env files not being available as variables ([#379](https://github.com/go-task/task/issues/379)).
|
||||
- The install script is now working for ARM platforms ([#428](https://github.com/go-task/task/issues/428)).
|
||||
|
||||
## v3.2.1 - 2021-01-09
|
||||
|
||||
- Fixed some bugs and regressions regarding dynamic variables and directories
|
||||
([#426](https://github.com/go-task/task/issues/426)).
|
||||
- The [slim-sprig](https://github.com/go-task/slim-sprig) package was updated
|
||||
with the upstream [sprig](https://github.com/Masterminds/sprig).
|
||||
|
||||
## v3.2.0 - 2021-01-07
|
||||
|
||||
- Fix the `.task` directory being created in the task directory instead of the
|
||||
Taskfile directory ([#247](https://github.com/go-task/task/issues/247)).
|
||||
- Fix a bug where dynamic variables (those declared with `sh:`) were not running
|
||||
in the task directory when the task has a custom dir or it was in an included
|
||||
Taskfile ([#384](https://github.com/go-task/task/issues/384)).
|
||||
- The watch feature (via the `--watch` flag) got a few different bug fixes and
|
||||
should be more stable now ([#423](https://github.com/go-task/task/issues/423), [#365](https://github.com/go-task/task/issues/365)).
|
||||
|
||||
## v3.1.0 - 2021-01-03
|
||||
|
||||
- Fix a bug when the checksum up-to-date resolution is used by a task with a
|
||||
custom `label:` attribute ([#412](https://github.com/go-task/task/issues/412)).
|
||||
- Starting from this release, we're releasing official ARMv6 and ARM64 binaries
|
||||
for Linux ([#375](https://github.com/go-task/task/issues/375), [#418](https://github.com/go-task/task/issues/418)).
|
||||
- Task now respects the order of declaration of included Taskfiles when
|
||||
evaluating variables declaring by them ([#393](https://github.com/go-task/task/issues/393)).
|
||||
- `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](https://github.com/go-task/task/issues/403)).
|
||||
|
||||
## v3.0.1 - 2020-12-26
|
||||
|
||||
- Allow use as a library by moving the required packages out of the `internal`
|
||||
directory ([#358](https://github.com/go-task/task/issues/358)).
|
||||
- Do not error if a specified dotenv file does not exist ([#378](https://github.com/go-task/task/issues/378), [#385](https://github.com/go-task/task/issues/385)).
|
||||
- Fix panic when you have empty tasks in your Taskfile ([#338](https://github.com/go-task/task/issues/338), [#362](https://github.com/go-task/task/issues/362)).
|
||||
|
||||
## v3.0.0 - 2020-08-16
|
||||
|
||||
- On `v3`, all CLI variables will be considered global variables ([#336](https://github.com/go-task/task/issues/336), [#341](https://github.com/go-task/task/issues/341))
|
||||
- Add support to `.env` like files ([#324](https://github.com/go-task/task/issues/324), [#356](https://github.com/go-task/task/issues/356)).
|
||||
- Add `label:` to task so you can override the task name in the logs
|
||||
([[#321](https://github.com/go-task/task/issues/321)](https://github.com/go-task/task/issues/321]), [#337](https://github.com/go-task/task/issues/337)).
|
||||
- Refactor how variables work on version 3 ([#311](https://github.com/go-task/task/issues/311)).
|
||||
- Disallow `expansions` on v3 since it has no effect.
|
||||
- `Taskvars.yml` is not automatically included anymore.
|
||||
- `Taskfile_{{OS}}.yml` is not automatically included anymore.
|
||||
- Allow interpolation on `includes`, so you can manually include a Taskfile
|
||||
based on operation system, for example.
|
||||
- Expose `.TASK` variable in templates with the task name ([#252](https://github.com/go-task/task/issues/252)).
|
||||
- Implement short task syntax ([#194](https://github.com/go-task/task/issues/194), [#240](https://github.com/go-task/task/issues/240)).
|
||||
- Added option to make included Taskfile run commands on its own directory
|
||||
([#260](https://github.com/go-task/task/issues/260), [#144](https://github.com/go-task/task/issues/144))
|
||||
- Taskfiles in version 1 are not supported anymore ([#237](https://github.com/go-task/task/issues/237)).
|
||||
- Added global `method:` option. With this option, you can set a default method
|
||||
to all tasks in a Taskfile ([#246](https://github.com/go-task/task/issues/246)).
|
||||
- Changed default method from `timestamp` to `checksum` ([#246](https://github.com/go-task/task/issues/246)).
|
||||
- New magic variables are now available when using `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](https://github.com/go-task/task/issues/216)).
|
||||
- We're now using [slim-sprig](https://github.com/go-task/slim-sprig) instead of
|
||||
[sprig](https://github.com/Masterminds/sprig), which allowed a file size
|
||||
reduction of about 22% ([#219](https://github.com/go-task/task/issues/219)).
|
||||
- We now use some colors on Task output to better distinguish message types -
|
||||
commands are green, errors are red, etc ([#207](https://github.com/go-task/task/issues/207)).
|
||||
|
||||
## v2.8.1 - 2020-05-20
|
||||
|
||||
- Fix error code for the `--help` flag ([#300](https://github.com/go-task/task/issues/300), [#330](https://github.com/go-task/task/issues/330)).
|
||||
- Print version to stdout instead of stderr ([#299](https://github.com/go-task/task/issues/299), [#329](https://github.com/go-task/task/issues/329)).
|
||||
- Supress `context` errors when using the `--watch` flag ([#313](https://github.com/go-task/task/issues/313), [#317](https://github.com/go-task/task/issues/317)).
|
||||
- Support templating on description ([#276](https://github.com/go-task/task/issues/276), [#283](https://github.com/go-task/task/issues/283)).
|
||||
|
||||
## v2.8.0 - 2019-12-07
|
||||
|
||||
- Add `--parallel` flag (alias `-p`) to run tasks given by the command line in
|
||||
parallel ([#266](https://github.com/go-task/task/issues/266)).
|
||||
- Fixed bug where calling the `task` CLI only informing global vars would not
|
||||
execute the `default` task.
|
||||
- Add hability to silent all tasks by adding `silent: true` a the root of the
|
||||
Taskfile.
|
||||
|
||||
## v2.7.1 - 2019-11-10
|
||||
|
||||
- Fix error being raised when `exit 0` was called ([#251](https://github.com/go-task/task/issues/251)).
|
||||
|
||||
## v2.7.0 - 2019-09-22
|
||||
|
||||
- Fixed panic bug when assigning a global variable ([#229](https://github.com/go-task/task/issues/229), [#243](https://github.com/go-task/task/issues/243)).
|
||||
- A task with `method: checksum` will now re-run if generated files are deleted
|
||||
([#228](https://github.com/go-task/task/issues/228), [#238](https://github.com/go-task/task/issues/238)).
|
||||
|
||||
## v2.6.0 - 2019-07-21
|
||||
|
||||
- Fixed some bugs regarding minor version checks on `version:`.
|
||||
- Add `preconditions:` to task ([#205](https://github.com/go-task/task/issues/205)).
|
||||
- Create directory informed on `dir:` if it doesn't exist ([#209](https://github.com/go-task/task/issues/209), [#211](https://github.com/go-task/task/issues/211)).
|
||||
- We now have a `--taskfile` flag (alias `-t`), which can be used to run another
|
||||
Taskfile (other than the default `Taskfile.yml`) ([#221](https://github.com/go-task/task/issues/221)).
|
||||
- It's now possible to install Task using Homebrew on Linux
|
||||
([go-task/homebrew-tap[#1](https://github.com/go-task/task/issues/1)](https://github.com/go-task/homebrew-tap/pull/1)).
|
||||
|
||||
## v2.5.2 - 2019-05-11
|
||||
|
||||
- Reverted YAML upgrade due issues with CRLF on Windows ([#201](https://github.com/go-task/task/issues/201),
|
||||
[go-yaml/yaml[#450](https://github.com/go-task/task/issues/450)](https://github.com/go-yaml/yaml/issues/450)).
|
||||
- Allow setting global variables through the CLI ([#192](https://github.com/go-task/task/issues/192)).
|
||||
|
||||
## 2.5.1 - 2019-04-27
|
||||
|
||||
- Fixed some issues with interactive command line tools, where sometimes the
|
||||
output were not being shown, and similar issues ([#114](https://github.com/go-task/task/issues/114), [#190](https://github.com/go-task/task/issues/190), [#200](https://github.com/go-task/task/issues/200)).
|
||||
- Upgraded [go-yaml/yaml](https://github.com/go-yaml/yaml) from v2 to v3.
|
||||
|
||||
## v2.5.0 - 2019-03-16
|
||||
|
||||
- We moved from the taskfile.org domain to the new fancy taskfile.dev domain.
|
||||
While stuff is being redirected, we strongly recommend to everyone that use
|
||||
[this install script](https://taskfile.dev/#/installation?id=install-script)
|
||||
to use the new taskfile.dev domain on scripts from now on.
|
||||
- Fixed to the ZSH completion ([#182](https://github.com/go-task/task/issues/182)).
|
||||
- Add
|
||||
[`--summary` flag along with `summary:` task attribute](https://taskfile.org/#/usage?id=display-summary-of-task)
|
||||
([#180](https://github.com/go-task/task/issues/180)).
|
||||
|
||||
## v2.4.0 - 2019-02-21
|
||||
|
||||
- Allow calling a task of the root Taskfile from an included Taskfile by
|
||||
prefixing it with `:` ([#161](https://github.com/go-task/task/issues/161), [#172](https://github.com/go-task/task/issues/172)).
|
||||
- Add flag to override the `output` option ([#173](https://github.com/go-task/task/issues/173)).
|
||||
- Fix bug where Task was persisting the new checksum on the disk when the Dry
|
||||
Mode is enabled ([#166](https://github.com/go-task/task/issues/166)).
|
||||
- Fix file timestamp issue when the file name has spaces ([#176](https://github.com/go-task/task/issues/176)).
|
||||
- Mitigating path expanding issues on Windows ([#170](https://github.com/go-task/task/issues/170)).
|
||||
|
||||
## v2.3.0 - 2019-01-02
|
||||
|
||||
- On Windows, Task can now be installed using [Scoop](https://scoop.sh/) ([#152](https://github.com/go-task/task/issues/152)).
|
||||
- Fixed issue with file/directory globing ([#153](https://github.com/go-task/task/issues/153)).
|
||||
- Added ability to globally set environment variables ([#138](https://github.com/go-task/task/issues/138), [#159](https://github.com/go-task/task/issues/159)).
|
||||
|
||||
## v2.2.1 - 2018-12-09
|
||||
|
||||
- This repository now uses Go Modules ([#143](https://github.com/go-task/task/issues/143)). We'll still keep the `vendor`
|
||||
directory in sync for some time, though;
|
||||
- Fixing a bug when the Taskfile has no tasks but includes another Taskfile
|
||||
([#150](https://github.com/go-task/task/issues/150));
|
||||
- Fix a bug when calling another task or a dependency in an included Taskfile
|
||||
([#151](https://github.com/go-task/task/issues/151)).
|
||||
|
||||
## v2.2.0 - 2018-10-25
|
||||
|
||||
- Added support for
|
||||
[including other Taskfiles](https://taskfile.org/#/usage?id=including-other-taskfiles)
|
||||
([#98](https://github.com/go-task/task/issues/98))
|
||||
- This should be considered experimental. For now, only including local files
|
||||
is supported, but support for including remote Taskfiles is being discussed.
|
||||
If you have any feedback, please comment on [#98](https://github.com/go-task/task/issues/98).
|
||||
- Task now have a dedicated documentation site: https://taskfile.org
|
||||
- Thanks to [Docsify](https://docsify.js.org/) for making this pretty easy. To
|
||||
check the source code, just take a look at the
|
||||
[docs](https://github.com/go-task/task/tree/main/docs) directory of this
|
||||
repository. Contributions to the documentation is really appreciated.
|
||||
|
||||
## v2.1.1 - 2018-09-17
|
||||
|
||||
- Fix suggestion to use `task --init` not being shown anymore (when a
|
||||
`Taskfile.yml` is not found)
|
||||
- Fix error when using checksum method and no file exists for a source glob
|
||||
([#131](https://github.com/go-task/task/issues/131))
|
||||
- Fix signal handling when the `--watch` flag is given ([#132](https://github.com/go-task/task/issues/132))
|
||||
|
||||
## v2.1.0 - 2018-08-19
|
||||
|
||||
- Add a `ignore_error` option to task and command ([#123](https://github.com/go-task/task/issues/123))
|
||||
- Add a dry run mode (`--dry` flag) ([#126](https://github.com/go-task/task/issues/126))
|
||||
|
||||
## v2.0.3 - 2018-06-24
|
||||
|
||||
- Expand environment variables on "dir", "sources" and "generates" ([#116](https://github.com/go-task/task/issues/116))
|
||||
- Fix YAML merging syntax ([#112](https://github.com/go-task/task/issues/112))
|
||||
- Add ZSH completion ([#111](https://github.com/go-task/task/issues/111))
|
||||
- Implement new `output` option. Please check out the
|
||||
[documentation](https://github.com/go-task/task#output-syntax)
|
||||
|
||||
## v2.0.2 - 2018-05-01
|
||||
|
||||
- Fix merging of YAML anchors ([#112](https://github.com/go-task/task/issues/112))
|
||||
|
||||
## v2.0.1 - 2018-03-11
|
||||
|
||||
- Fixes panic on `task --list`
|
||||
|
||||
## v2.0.0 - 2018-03-08
|
||||
|
||||
Version 2.0.0 is here, with a new Taskfile format.
|
||||
|
||||
Please, make sure to read the
|
||||
[Taskfile versions](https://github.com/go-task/task/blob/main/TASKFILE_VERSIONS.md)
|
||||
document, since it describes in depth what changed for this version.
|
||||
|
||||
- New Taskfile version 2 ([#77](https://github.com/go-task/task/issues/77))
|
||||
- Possibility to have global variables in the `Taskfile.yml` instead of
|
||||
`Taskvars.yml` ([#66](https://github.com/go-task/task/issues/66))
|
||||
- Small improvements and fixes
|
||||
|
||||
## v1.4.4 - 2017-11-19
|
||||
|
||||
- Handle SIGINT and SIGTERM ([#75](https://github.com/go-task/task/issues/75));
|
||||
- List: print message with there's no task with description;
|
||||
- Expand home dir ("~" symbol) on paths ([#74](https://github.com/go-task/task/issues/74));
|
||||
- Add Snap as an installation method;
|
||||
- Move examples to its own repo;
|
||||
- Watch: also walk on tasks called on on "cmds", and not only on "deps";
|
||||
- Print logs to stderr instead of stdout ([#68](https://github.com/go-task/task/issues/68));
|
||||
- Remove deprecated `set` keyword;
|
||||
- Add checksum based status check, alternative to timestamp based.
|
||||
|
||||
## v1.4.3 - 2017-09-07
|
||||
|
||||
- Allow assigning variables to tasks at run time via CLI ([#33](https://github.com/go-task/task/issues/33))
|
||||
- Added suport for multiline variables from sh ([#64](https://github.com/go-task/task/issues/64))
|
||||
- Fixes env: remove square braces and evaluate shell ([#62](https://github.com/go-task/task/issues/62))
|
||||
- Watch: change watch library and few fixes and improvements
|
||||
- When use watching, cancel and restart long running process on file change ([#59](https://github.com/go-task/task/issues/59)
|
||||
and [#60](https://github.com/go-task/task/issues/60))
|
||||
|
||||
## v1.4.2 - 2017-07-30
|
||||
|
||||
- Flag to set directory of execution
|
||||
- Always echo command if is verbose mode
|
||||
- Add silent mode to disable echoing of commands
|
||||
- Fixes and improvements of variables ([#56](https://github.com/go-task/task/issues/56))
|
||||
|
||||
## v1.4.1 - 2017-07-15
|
||||
|
||||
- Allow use of YAML for dynamic variables instead of $ prefix
|
||||
- `VAR: {sh: echo Hello}` instead of `VAR: $echo Hello`
|
||||
- Add `--list` (or `-l`) flag to print existing tasks
|
||||
- OS specific Taskvars file (e.g. `Taskvars_windows.yml`, `Taskvars_linux.yml`,
|
||||
etc)
|
||||
- Consider task up-to-date on equal timestamps ([#49](https://github.com/go-task/task/issues/49))
|
||||
- Allow absolute path in generates section ([#48](https://github.com/go-task/task/issues/48))
|
||||
- Bugfix: allow templating when calling deps ([#42](https://github.com/go-task/task/issues/42))
|
||||
- Fix panic for invalid task in cyclic dep detection
|
||||
- Better error output for dynamic variables in Taskvars.yml ([#41](https://github.com/go-task/task/issues/41))
|
||||
- Allow template evaluation in parameters
|
||||
|
||||
## v1.4.0 - 2017-07-06
|
||||
|
||||
- Cache dynamic variables
|
||||
- Add verbose mode (`-v` flag)
|
||||
- Support to task parameters (overriding vars) ([#31](https://github.com/go-task/task/issues/31)) ([#32](https://github.com/go-task/task/issues/32))
|
||||
- Print command, also when "set:" is specified ([#35](https://github.com/go-task/task/issues/35))
|
||||
- Improve task command help text ([#35](https://github.com/go-task/task/issues/35))
|
||||
|
||||
## v1.3.1 - 2017-06-14
|
||||
|
||||
- Fix glob not working on commands ([#28](https://github.com/go-task/task/issues/28))
|
||||
- Add ExeExt template function
|
||||
- Add `--init` flag to create a new Taskfile
|
||||
- Add status option to prevent task from running ([#27](https://github.com/go-task/task/issues/27))
|
||||
- Allow interpolation on `generates` and `sources` attributes ([#26](https://github.com/go-task/task/issues/26))
|
||||
|
||||
## v1.3.0 - 2017-04-24
|
||||
|
||||
- Migrate from os/exec.Cmd to a native Go sh/bash interpreter
|
||||
- This is a potentially breaking change if you use Windows.
|
||||
- Now, `cmd` is not used anymore on Windows. Always use Bash-like syntax for
|
||||
your commands, even on Windows.
|
||||
- Add "ToSlash" and "FromSlash" to template functions
|
||||
- Use functions defined on github.com/Masterminds/sprig
|
||||
- Do not redirect stdin while running variables commands
|
||||
- Using `context` and `errgroup` packages (this will make other tasks to be
|
||||
cancelled, if one returned an error)
|
||||
|
||||
## v1.2.0 - 2017-04-02
|
||||
|
||||
- More tests and Travis integration
|
||||
- Watch a task (experimental)
|
||||
- Possibility to call another task
|
||||
- Fix "=" not being reconized in variables/environment variables
|
||||
- Tasks can now have a description, and help will print them ([#10](https://github.com/go-task/task/issues/10))
|
||||
- Task dependencies now run concurrently
|
||||
- Support for a default task ([#16](https://github.com/go-task/task/issues/16))
|
||||
|
||||
## v1.1.0 - 2017-03-08
|
||||
|
||||
- Support for YAML, TOML and JSON ([#1](https://github.com/go-task/task/issues/1))
|
||||
- Support running command in another directory ([#4](https://github.com/go-task/task/issues/4))
|
||||
- `--force` or `-f` flag to force execution of task even when it's up-to-date
|
||||
- Detection of cyclic dependencies ([#5](https://github.com/go-task/task/issues/5))
|
||||
- Support for variables ([#6](https://github.com/go-task/task/issues/6), [#9](https://github.com/go-task/task/issues/9), [#14](https://github.com/go-task/task/issues/14))
|
||||
- Operation System specific commands and variables ([#13](https://github.com/go-task/task/issues/13))
|
||||
|
||||
## v1.0.0 - 2017-02-28
|
||||
|
||||
- Add LICENSE file
|
||||
45
docs/docs/community.md
Normal file
45
docs/docs/community.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
slug: /community/
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Community
|
||||
|
||||
Some of the work to improve the Task ecosystem is done by the community, be it
|
||||
installation methods or integrations with code editor. I (the author) am
|
||||
thankful for everyone that helps me to improve the overall experience.
|
||||
|
||||
## Translations
|
||||
|
||||
[@DeronW](https://github.com/DeronW) maintains the
|
||||
[Chinese translation](https://task-zh.readthedocs.io/zh_CN/latest/) of the
|
||||
website [on this repository](https://github.com/DeronW/task).
|
||||
|
||||
## Integrations
|
||||
|
||||
Many of our integrations are contributed and maintained by the community. You
|
||||
can view the full list of community integrations
|
||||
[here](/integrations#community-integrations).
|
||||
|
||||
## Installation methods
|
||||
|
||||
Some installation methods are maintained by third party:
|
||||
|
||||
- [GitHub Actions](https://github.com/arduino/setup-task) by
|
||||
[@arduino](https://github.com/arduino)
|
||||
- [AUR](https://aur.archlinux.org/packages/go-task-bin) by
|
||||
[@carlsmedstad](https://github.com/carlsmedstad)
|
||||
- [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/task.json)
|
||||
- [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/)
|
||||
- [NixOS](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/go-task/default.nix)
|
||||
|
||||
## More
|
||||
|
||||
Also, thanks for all the
|
||||
[code contributors](https://github.com/go-task/task/graphs/contributors),
|
||||
[financial contributors](https://opencollective.com/task), all those who
|
||||
[reported bugs](https://github.com/go-task/task/issues?q=is%3Aissue) and
|
||||
[answered questions](https://github.com/go-task/task/discussions).
|
||||
|
||||
If you know something that is missing in this document, please submit a pull
|
||||
request.
|
||||
167
docs/docs/contributing.md
Normal file
167
docs/docs/contributing.md
Normal file
@@ -0,0 +1,167 @@
|
||||
---
|
||||
slug: /contributing/
|
||||
sidebar_position: 11
|
||||
---
|
||||
|
||||
# Contributing
|
||||
|
||||
Contributions to Task are very welcome, but we ask that you read this document
|
||||
before submitting a PR.
|
||||
|
||||
:::note
|
||||
|
||||
This document applies to the core [Task][task] repository _and_ [Task for Visual
|
||||
Studio Code][vscode-task].
|
||||
|
||||
:::
|
||||
|
||||
## Before you start
|
||||
|
||||
- **Check existing work** - Is there an existing PR? Are there issues discussing
|
||||
the feature/change you want to make? Please make sure you consider/address
|
||||
these discussions in your work.
|
||||
- **Backwards compatibility** - Will your change break existing Taskfiles? It is
|
||||
much more likely that your change will merged if it backwards compatible. Is
|
||||
there an approach you can take that maintains this compatibility? If not,
|
||||
consider opening an issue first so that API changes can be discussed before
|
||||
you invest your time into a PR.
|
||||
- **Experiments** - If there is no way to make your change backward compatible
|
||||
then there is a procedure to introduce breaking changes into minor versions.
|
||||
We call these "[experiments][experiments]". If you're intending to work on an
|
||||
experiment, then please read the [experiments workflow][experiments-workflow]
|
||||
document carefully and submit a proposal first.
|
||||
|
||||
## 1. Setup
|
||||
|
||||
- **Go** - Task is written in [Go][go]. We always support the latest two major
|
||||
Go versions, so make sure your version is recent enough.
|
||||
- **Node.js** - [Node.js][nodejs] is used to host Task's documentation server
|
||||
and is required if you want to run this server locally. It is also required if
|
||||
you want to contribute to the Visual Studio Code extension.
|
||||
- **Yarn** - [Yarn][yarn] is the Node.js package manager used by Task.
|
||||
|
||||
## 2. Making changes
|
||||
|
||||
- **Code style** - Try to maintain the existing code style where possible. Go
|
||||
code should be formatted by [`gofumpt`][gofumpt] and linted using
|
||||
[`golangci-lint`][golangci-lint]. Any Markdown or TypeScript files should be
|
||||
formatted and linted by [Prettier][prettier]. This style is enforced by our CI
|
||||
to ensure that we have a consistent style across the project. You can use the
|
||||
`task lint` command to lint the code locally and the `task lint:fix` command
|
||||
to automatically fix any issues that are found.
|
||||
- **Documentation** - Ensure that you add/update any relevant documentation. See
|
||||
the [updating documentation](#updating-documentation) section below.
|
||||
- **Tests** - Ensure that you add/update any relevant tests and that all tests
|
||||
are passing before submitting the PR. See the [writing tests](#writing-tests)
|
||||
section below.
|
||||
|
||||
### Running your changes
|
||||
|
||||
To run Task with working changes, you can use `go run ./cmd/task`. To run a
|
||||
development build of task against a test Taskfile in `testdata`, you can use
|
||||
`go run ./cmd/task --dir ./testdata/<my_test_dir> <task_name>`.
|
||||
|
||||
To run Task for Visual Studio Code, you can open the project in VSCode and hit
|
||||
F5 (or whatever you debug keybind is set to). This will open a new VSCode window
|
||||
with the extension running. Debugging this way is recommended as it will allow
|
||||
you to set breakpoints and step through the code. Otherwise, you can run
|
||||
`task package` which will generate a `.vsix` file that can be used to manually
|
||||
install the extension.
|
||||
|
||||
### Updating documentation
|
||||
|
||||
Task uses [Docusaurus][docusaurus] to host a documentation server. The code for
|
||||
this is located in the core Task repository. This can be setup and run locally
|
||||
by using `task docs` (requires `nodejs` & `yarn`). All content is written in
|
||||
Markdown and is located in the `docs/docs` directory. All Markdown documents
|
||||
should have an 80 character line wrap limit (enforced by Prettier).
|
||||
|
||||
When making a change, consider whether a change to the [Usage Guide](./usage.md)
|
||||
is necessary. This document contains descriptions and examples of how to use
|
||||
Task features. If you're adding a new feature, try to find an appropriate place
|
||||
to add a new section. If you're updating an existing feature, ensure that the
|
||||
documentation and any examples are up-to-date. Ensure that any examples follow
|
||||
the [Taskfile Styleguide](./styleguide.md).
|
||||
|
||||
If you added a new field, command or flag, ensure that you add it to the
|
||||
[API Reference](./api_reference.md). New fields also need to be added to the
|
||||
[JSON Schema][json-schema]. The descriptions for fields in the API reference and
|
||||
the schema should match.
|
||||
|
||||
### Writing tests
|
||||
|
||||
A lot of Task's tests are held in the `task_test.go` file in the project root
|
||||
and this is where you'll most likely want to add new ones too. Most of these
|
||||
tests also have a subdirectory in the `testdata` directory where any
|
||||
Taskfiles/data required to run the tests are stored.
|
||||
|
||||
When making a changes, consider whether new tests are required. These tests
|
||||
should ensure that the functionality you are adding will continue to work in the
|
||||
future. Existing tests may also need updating if you have changed Task's
|
||||
behavior.
|
||||
|
||||
You may also consider adding unit tests for any new functions you have added.
|
||||
The unit tests should follow the Go convention of being location in a file named
|
||||
`*_test.go` in the same package as the code being tested.
|
||||
|
||||
## 3. Committing your code
|
||||
|
||||
Try to write meaningful commit messages and avoid having too many commits on the
|
||||
PR. Most PRs should likely have a single commit (although for bigger PRs it may
|
||||
be reasonable to split it in a few). Git squash and rebase is your friend!
|
||||
|
||||
If you're not sure how to format your commit message, check out [Conventional
|
||||
Commits][conventional-commits]. This style is not enforced, but it is a good way
|
||||
to make your commit messages more readable and consistent.
|
||||
|
||||
## 4. Submitting a PR
|
||||
|
||||
- **Describe your changes** - Ensure that you provide a comprehensive
|
||||
description of your changes.
|
||||
- **Issue/PR links** - Link any previous work such as related issues or PRs.
|
||||
Please describe how your changes differ to/extend this work.
|
||||
- **Examples** - Add any examples or screenshots that you think are useful to
|
||||
demonstrate the effect of your changes.
|
||||
- **Draft PRs** - If your changes are incomplete, but you would like to discuss
|
||||
them, open the PR as a draft and add a comment to start a discussion. Using
|
||||
comments rather than the PR description allows the description to be updated
|
||||
later while preserving any discussions.
|
||||
|
||||
## FAQ
|
||||
|
||||
> I want to contribute, where do I start?
|
||||
|
||||
Take a look at the list of [open issues for Task][task-open-issues] or [Task for
|
||||
Visual Studio Code][vscode-task-open-issues]. We have a [good first
|
||||
issue][good-first-issue] label for simpler issues that are ideal for first time
|
||||
contributions.
|
||||
|
||||
All kinds of contributions are welcome, whether its a typo fix or a shiny new
|
||||
feature. You can also contribute by upvoting/commenting on issues, helping to
|
||||
answer questions or contributing to other [community projects](./community.md).
|
||||
|
||||
> I'm stuck, where can I get help?
|
||||
|
||||
If you have questions, feel free to ask them in the `#help` forum channel on our
|
||||
[Discord server][discord-server] or open a [Discussion][discussion] on GitHub.
|
||||
|
||||
---
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[task]: https://github.com/go-task/task
|
||||
[vscode-task]: https://github.com/go-task/vscode-task
|
||||
[go]: https://go.dev
|
||||
[gofumpt]: https://github.com/mvdan/gofumpt
|
||||
[golangci-lint]: https://golangci-lint.run
|
||||
[prettier]: https://prettier.io
|
||||
[nodejs]: https://nodejs.org/en/
|
||||
[yarn]: https://yarnpkg.com/
|
||||
[docusaurus]: https://docusaurus.io
|
||||
[json-schema]: https://github.com/go-task/task/blob/main/docs/static/schema.json
|
||||
[task-open-issues]: https://github.com/go-task/task/issues
|
||||
[vscode-task-open-issues]: https://github.com/go-task/vscode-task/issues
|
||||
[good-first-issue]: https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
|
||||
[discord-server]: https://discord.gg/6TY36E39UK
|
||||
[discussion]: https://github.com/go-task/task/discussions
|
||||
[conventional-commits]: https://www.conventionalcommits.org
|
||||
<!-- prettier-ignore-end -->
|
||||
51
docs/docs/donate.md
Normal file
51
docs/docs/donate.md
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
slug: /donate/
|
||||
sidebar_position: 15
|
||||
---
|
||||
|
||||
# Donate
|
||||
|
||||
If you find this project useful, you can consider donating by using one of the
|
||||
channels listed below.
|
||||
|
||||
This is just a way of saying "thank you", it won't give you any benefits like
|
||||
higher priority on issues or something similar.
|
||||
|
||||
Companies who donate at least $50/month will be featured as a "Gold Sponsor" in
|
||||
the website homepage and on the GitHub repository README. Make contact with
|
||||
[@andreynering] with the logo you want to be shown. Suspect businesses
|
||||
(gambling, casinos, etc) won't be allowed, though.
|
||||
|
||||
## GitHub Sponsors
|
||||
|
||||
The preferred way to donate to the maintainers is via GitHub Sponsors. Just use
|
||||
the following links to do your donation:
|
||||
|
||||
- [@andreynering](https://github.com/sponsors/andreynering)
|
||||
- [@pd93](https://github.com/sponsors/pd93)
|
||||
|
||||
## Open Collective
|
||||
|
||||
If you prefer [Open Collective](https://opencollective.com/task) you can donate
|
||||
by using these links:
|
||||
|
||||
- [$2 per month](https://opencollective.com/task/contribute/backer-4034/checkout)
|
||||
- [$5 per month](https://opencollective.com/task/contribute/supporter-8404/checkout)
|
||||
- [$20 per month](https://opencollective.com/task/contribute/sponsor-4035/checkout)
|
||||
- [$50 per month](https://opencollective.com/task/contribute/sponsor-28775/checkout)
|
||||
- [Custom value - One-time donation option supported](https://opencollective.com/task/donate)
|
||||
|
||||
## PayPal
|
||||
|
||||
You can donate to [@andreynering] via PayPal as well:
|
||||
|
||||
- [Any value - One-time donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A¤cy_code=USD&source=url)
|
||||
|
||||
## PIX (Brazil only)
|
||||
|
||||
And if you're Brazilian, you can also donate to [@andreynering] via PIX by
|
||||
[using this QR Code](/img/pix.png).
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[@andreynering]: https://github.com/andreynering
|
||||
<!-- prettier-ignore-end -->
|
||||
73
docs/docs/experiments/experiments.md
Normal file
73
docs/docs/experiments/experiments.md
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
slug: /experiments/
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Experiments
|
||||
|
||||
:::caution
|
||||
|
||||
All experimental features are subject to breaking changes and/or removal _at any
|
||||
time_. We strongly recommend that you do not use these features in a production
|
||||
environment. They are intended for testing and feedback only.
|
||||
|
||||
:::
|
||||
|
||||
In order to allow Task to evolve quickly, we roll out breaking changes to minor
|
||||
versions behind experimental flags. This allows us to gather feedback on
|
||||
breaking changes before committing to a major release. This document describes
|
||||
the current set of experimental features and the deprecated feature that they
|
||||
are intended to replace.
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of
|
||||
Task to test out experimental features. You can also disable a feature by
|
||||
specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for
|
||||
permanently enabling experimental features in your environment.
|
||||
|
||||
Flags will always override environment variables.
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
Each section below details an experiment or deprecation and explains what the
|
||||
flags/environment variables to enable the experiment are and how the feature's
|
||||
behavior will change. It will also explain what you need to do to migrate any
|
||||
existing Taskfiles to the new behavior.
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
{Short explanation of how users should migrate to the new behavior}
|
||||
|
||||
-->
|
||||
|
||||
### ![deprecated] Version 2 Schema ([#1197][deprecate-version-2-schema])
|
||||
|
||||
The Taskfile v2 schema was introduced in March 2018 and replaced by version 3 in
|
||||
August the following year. Users have had a long time to update and so we feel
|
||||
that it is time to tidy up the codebase and focus on new functionality instead.
|
||||
|
||||
This notice does not mean that we are immediately removing support for version 2
|
||||
schemas. However, support will not be extended to future major releases and we
|
||||
_strongly recommend_ that anybody still using a version 2 schema upgrades to
|
||||
version 3 as soon as possible.
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3
|
||||
Release Notes][version-3-release-notes].
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[breaking-change-proposal]: https://github.com/go-task/task/discussions/1191
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
[experiment]: https://img.shields.io/badge/experiment-yellow
|
||||
<!-- prettier-ignore-end -->
|
||||
84
docs/docs/experiments/workflow.md
Normal file
84
docs/docs/experiments/workflow.md
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
slug: /experiments/workflow/
|
||||
---
|
||||
|
||||
# Workflow
|
||||
|
||||
Experiments are a way for us to test out new features in Task before committing
|
||||
to them in a major release. Because this concept is built around the idea of
|
||||
feedback from our community, we have built a workflow for the process of
|
||||
introducing these changes. This ensures that experiments are given the attention
|
||||
and time that they need and that we are getting the best possible results out of
|
||||
them.
|
||||
|
||||
The sections below describe the various stages that an experiment must go
|
||||
through from its proposal all the way to being released in a major version of
|
||||
Task.
|
||||
|
||||
## 1. Proposal
|
||||
|
||||
All experimental features start with a proposal in the form of a GitHub issue.
|
||||
If the maintainers decide that an issue has enough support and is a breaking
|
||||
change or is complex/controversial enough to require user feedback, then the
|
||||
issue will be marked with the ![proposal] label. At this point, the issue
|
||||
becomes a proposal and a period of consultation begins. During this period, we
|
||||
request that users provide feedback on the proposal and how it might effect
|
||||
their use of Task. It is up to the discretion of the maintainers to decide how
|
||||
long this period lasts.
|
||||
|
||||
## 2. Draft
|
||||
|
||||
Once a proposal's consultation ends, a contributor may pick up the work and
|
||||
begin the initial implementation. Once a PR is opened, the maintainers will
|
||||
ensure that it meets the requirements for an experimental feature (i.e. flags
|
||||
are in the right format etc) and merge the feature. Once this code is released,
|
||||
the status will be updated via the ![draft] label. This indicates that an
|
||||
implementation is now available for use in a release and the experiment is open
|
||||
for feedback.
|
||||
|
||||
:::note
|
||||
|
||||
During the draft period, major changes to the implementation may be made based
|
||||
on the feedback received from users. There are _no stability guarantees_ and
|
||||
experimental features may be abandoned _at any time_.
|
||||
|
||||
:::
|
||||
|
||||
## 3. Candidate
|
||||
|
||||
Once an acceptable level of consensus has been reached by the community and
|
||||
feedback/changes are less frequent/significant, the status may be updated via
|
||||
the ![candidate] label. This indicates that a proposal is _likely_ to accepted
|
||||
and will enter a period for final comments and minor changes.
|
||||
|
||||
## 4. Stable
|
||||
|
||||
Once a suitable amount of time has passed with no changes or feedback, an
|
||||
experiment will be given the ![stable] label. At this point, the functionality
|
||||
will be treated like any other feature in Task and any changes _must_ be
|
||||
backward compatible. This allows users to migrate to the new functionality
|
||||
without having to worry about anything breaking in future releases. This
|
||||
provides the best experience for users migrating to a new major version.
|
||||
|
||||
## 5. Released
|
||||
|
||||
When making a new major release of Task, all experiments marked as ![stable]
|
||||
will move to ![released] and their behaviors will become the new default in
|
||||
Task. Experiments in an earlier stage (i.e. not stable) cannot be released and
|
||||
so will continue to be experiments in the new version.
|
||||
|
||||
## Abandoned / Superseded
|
||||
|
||||
If an experiment is unsuccessful at any point then it will be given the
|
||||
![abandoned] or ![superseded] labels depending on which is more suitable. These
|
||||
experiments will be removed from Task.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[proposal]: https://img.shields.io/badge/experiment:%20proposal-purple
|
||||
[draft]: https://img.shields.io/badge/experiment:%20draft-purple
|
||||
[candidate]: https://img.shields.io/badge/experiment:%20candidate-purple
|
||||
[stable]: https://img.shields.io/badge/experiment:%20stable-purple
|
||||
[released]: https://img.shields.io/badge/experiment:%20released-purple
|
||||
[abandoned]: https://img.shields.io/badge/experiment:%20abandoned-purple
|
||||
[superseded]: https://img.shields.io/badge/experiment:%20superseded-purple
|
||||
<!-- prettier-ignore-end -->
|
||||
101
docs/docs/faq.md
Normal file
101
docs/docs/faq.md
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
slug: /faq/
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# FAQ
|
||||
|
||||
This page contains a list of frequently asked questions about Task.
|
||||
|
||||
## Why won't my task update my shell environment?
|
||||
|
||||
This is a limitation of how shells work. Task runs as a subprocess of your
|
||||
current shell, so it can't change the environment of the shell that started it.
|
||||
This limitation is shared by other task runners and build tools too.
|
||||
|
||||
A common way to work around this is to create a task that will generate output
|
||||
that can be parsed by your shell. For example, to set an environment variable on
|
||||
your shell you can write a task like this:
|
||||
|
||||
```yaml
|
||||
my-shell-env:
|
||||
cmds:
|
||||
- echo "export FOO=foo"
|
||||
- echo "export BAR=bar"
|
||||
```
|
||||
|
||||
Now run `eval $(task my-shell-env)` and the variables `$FOO` and `$BAR` will be
|
||||
available in your shell.
|
||||
|
||||
## I can't reuse my shell in a task's commands
|
||||
|
||||
Task runs each command as a separate shell process, so something you do in one
|
||||
command won't effect any future commands. For example, this won't work:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- a=foo
|
||||
- echo $a
|
||||
# outputs ""
|
||||
```
|
||||
|
||||
To work around this you can either use a multiline command:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- |
|
||||
a=foo
|
||||
echo $a
|
||||
# outputs "foo"
|
||||
```
|
||||
|
||||
Or for more complex multi-line commands it is recommended to move your code into
|
||||
a separate file and call that instead:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- ./foo-printer.bash
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
a=foo
|
||||
echo $a
|
||||
```
|
||||
|
||||
## 'x' builtin command doesn't work on Windows
|
||||
|
||||
The default shell on Windows (`cmd` and `powershell`) do not have commands like
|
||||
`rm` and `cp` available as builtins. This means that these commands won't work.
|
||||
If you want to make your Taskfile fully cross-platform, you'll need to work
|
||||
around this limitation using one of the following methods:
|
||||
|
||||
- Use the `{{OS}}` function to run an OS-specific script.
|
||||
- Use something like `{{if eq OS "windows"}}powershell {{end}}<my_cmd>` to
|
||||
detect windows and run the command in Powershell directly.
|
||||
- Use a shell on Windows that supports these commands as builtins, such as [Git
|
||||
Bash][git-bash] or [WSL][wsl].
|
||||
|
||||
We want to make improvements to this part of Task and the issues below track
|
||||
this work. Constructive comments and contributions are very welcome!
|
||||
|
||||
- [#197](https://github.com/go-task/task/issues/197)
|
||||
- [mvdan/sh#93](https://github.com/mvdan/sh/issues/93)
|
||||
- [mvdan/sh#97](https://github.com/mvdan/sh/issues/97)
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[git-bash]: https://gitforwindows.org/
|
||||
[wsl]: https://learn.microsoft.com/en-us/windows/wsl/install
|
||||
<!-- prettier-ignore-end -->
|
||||
284
docs/docs/installation.md
Normal file
284
docs/docs/installation.md
Normal file
@@ -0,0 +1,284 @@
|
||||
---
|
||||
slug: /installation/
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
Task offers many installation methods. Check out the available methods below.
|
||||
|
||||
## Package Managers
|
||||
|
||||
### Homebrew
|
||||
|
||||
If you're on macOS or Linux and have [Homebrew][homebrew] installed, getting
|
||||
Task is as simple as running:
|
||||
|
||||
```bash
|
||||
brew install go-task/tap/go-task
|
||||
```
|
||||
|
||||
The above Formula is
|
||||
[maintained by ourselves](https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb).
|
||||
|
||||
Recently, Task was also made available
|
||||
[on the official Homebrew repository](https://formulae.brew.sh/formula/go-task),
|
||||
so you also have that option if you prefer:
|
||||
|
||||
```bash
|
||||
brew install go-task
|
||||
```
|
||||
|
||||
### Snap
|
||||
|
||||
Task is available in [Snapcraft][snapcraft], but keep in mind that your Linux
|
||||
distribution should allow classic confinement for Snaps to Task work right:
|
||||
|
||||
```bash
|
||||
sudo snap install task --classic
|
||||
```
|
||||
|
||||
### Chocolatey
|
||||
|
||||
If you're on Windows and have [Chocolatey][choco] installed, getting Task is as
|
||||
simple as running:
|
||||
|
||||
```bash
|
||||
choco install go-task
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
|
||||
### Scoop
|
||||
|
||||
If you're on Windows and have [Scoop][scoop] installed, getting Task is as
|
||||
simple as running:
|
||||
|
||||
```cmd
|
||||
scoop install task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may
|
||||
take some time until it's available on Scoop.
|
||||
|
||||
### AUR
|
||||
|
||||
If you're on Arch Linux you can install Task from
|
||||
[AUR](https://aur.archlinux.org/packages/go-task-bin) using your favorite
|
||||
package manager such as `yay`, `pacaur` or `yaourt`:
|
||||
|
||||
```cmd
|
||||
yay -S go-task-bin
|
||||
```
|
||||
|
||||
Alternatively, there's
|
||||
[this package](https://aur.archlinux.org/packages/go-task) which installs from
|
||||
the source code instead of downloading the binary from the
|
||||
[releases page](https://github.com/go-task/task/releases):
|
||||
|
||||
```cmd
|
||||
yay -S go-task
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
|
||||
### Fedora
|
||||
|
||||
If you're on Fedora Linux you can install Task from the official
|
||||
[Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/)
|
||||
repository using `dnf`:
|
||||
|
||||
```cmd
|
||||
sudo dnf install go-task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may
|
||||
take some time until it's available in
|
||||
[Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/).
|
||||
|
||||
### Nix
|
||||
|
||||
If you're on NixOS or have Nix installed you can install Task from
|
||||
[nixpkgs](https://github.com/NixOS/nixpkgs):
|
||||
|
||||
```cmd
|
||||
nix-env -iA nixpkgs.go-task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may
|
||||
take some time until it's available in
|
||||
[nixpkgs](https://github.com/NixOS/nixpkgs).
|
||||
|
||||
### npm
|
||||
|
||||
You can also use Node and npm to install Task by installing
|
||||
[this package](https://www.npmjs.com/package/@go-task/cli).
|
||||
|
||||
```bash
|
||||
npm install -g @go-task/cli
|
||||
```
|
||||
|
||||
### Winget
|
||||
|
||||
If you are using Windows and installed the
|
||||
[winget](https://github.com/microsoft/winget-cli) package management tool, you
|
||||
can install Task from [winget-pkgs](https://github.com/microsoft/winget-pkgs).
|
||||
|
||||
```bash
|
||||
winget install Task.Task
|
||||
```
|
||||
|
||||
## Get The Binary
|
||||
|
||||
### Binary
|
||||
|
||||
You can download the binary from the [releases page on GitHub][releases] and add
|
||||
to your `$PATH`.
|
||||
|
||||
DEB and RPM packages are also available.
|
||||
|
||||
The `task_checksums.txt` file contains the SHA-256 checksum for each file.
|
||||
|
||||
### Install Script
|
||||
|
||||
We also have an [install script][installscript] which is very useful in
|
||||
scenarios like CI. Many thanks to [GoDownloader][godownloader] for enabling the
|
||||
easy generation of this script.
|
||||
|
||||
By default, it installs on the `./bin` directory relative to the working
|
||||
directory:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
|
||||
```
|
||||
|
||||
It is possible to override the installation directory with the `-b` parameter.
|
||||
On Linux, common choices are `~/.local/bin` and `~/bin` to install for the
|
||||
current user or `/usr/local/bin` to install for all users:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
|
||||
```
|
||||
|
||||
:::caution
|
||||
|
||||
On macOS and Windows, `~/.local/bin` and `~/bin` are not added to `$PATH` by
|
||||
default.
|
||||
|
||||
:::
|
||||
|
||||
### GitHub Actions
|
||||
|
||||
If you want to install Task in GitHub Actions you can try using
|
||||
[this action](https://github.com/arduino/setup-task) by the Arduino team:
|
||||
|
||||
```yaml
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
|
||||
## Build From Source
|
||||
|
||||
### Go Modules
|
||||
|
||||
Ensure that you have a supported version of [Go][go] properly installed and
|
||||
setup. You can find the minimum required version of Go in the
|
||||
[go.mod](https://github.com/go-task/task/blob/main/go.mod#L3) file.
|
||||
|
||||
You can then install the latest release globally by running:
|
||||
|
||||
```bash
|
||||
go install github.com/go-task/task/v3/cmd/task@latest
|
||||
```
|
||||
|
||||
Or you can install into another directory:
|
||||
|
||||
```bash
|
||||
env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
For CI environments we recommend using the [install script](#install-script)
|
||||
instead, which is faster and more stable, since it'll just download the latest
|
||||
released binary.
|
||||
|
||||
:::
|
||||
|
||||
## Setup completions
|
||||
|
||||
Download the autocompletion file corresponding to your shell.
|
||||
|
||||
[All completions are available on the Task repository](https://github.com/go-task/task/tree/main/completion).
|
||||
|
||||
### Bash
|
||||
|
||||
First, ensure that you installed bash-completion using your package manager.
|
||||
|
||||
Make the completion file executable:
|
||||
|
||||
```
|
||||
chmod +x path/to/task.bash
|
||||
```
|
||||
|
||||
After, add this to your `~/.bash_profile`:
|
||||
|
||||
```shell
|
||||
source path/to/task.bash
|
||||
```
|
||||
|
||||
### ZSH
|
||||
|
||||
Put the `_task` file somewhere in your `$FPATH`:
|
||||
|
||||
```shell
|
||||
mv path/to/_task /usr/local/share/zsh/site-functions/_task
|
||||
```
|
||||
|
||||
Ensure that the following is present in your `~/.zshrc`:
|
||||
|
||||
```shell
|
||||
autoload -U compinit
|
||||
compinit -i
|
||||
```
|
||||
|
||||
ZSH version 5.7 or later is recommended.
|
||||
|
||||
### Fish
|
||||
|
||||
Move the `task.fish` completion script:
|
||||
|
||||
```shell
|
||||
mv path/to/task.fish ~/.config/fish/completions/task.fish
|
||||
```
|
||||
|
||||
### PowerShell
|
||||
|
||||
Open your profile script with:
|
||||
|
||||
```
|
||||
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
|
||||
notepad $profile
|
||||
```
|
||||
|
||||
Add the line and save the file:
|
||||
|
||||
```shell
|
||||
Invoke-Expression -Command path/to/task.ps1
|
||||
```
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[go]: https://golang.org/
|
||||
[snapcraft]: https://snapcraft.io/task
|
||||
[homebrew]: https://brew.sh/
|
||||
[installscript]: https://github.com/go-task/task/blob/main/install-task.sh
|
||||
[releases]: https://github.com/go-task/task/releases
|
||||
[godownloader]: https://github.com/goreleaser/godownloader
|
||||
[choco]: https://chocolatey.org/
|
||||
[scoop]: https://scoop.sh/
|
||||
<!-- prettier-ignore-end -->
|
||||
86
docs/docs/integrations.md
Normal file
86
docs/docs/integrations.md
Normal file
@@ -0,0 +1,86 @@
|
||||
---
|
||||
slug: /integrations/
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Integrations
|
||||
|
||||
## Visual Studio Code Extension
|
||||
|
||||
Task has an
|
||||
[official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task).
|
||||
The code for this project can be found
|
||||
[here](https://github.com/go-task/vscode-task). To use this extension, you must
|
||||
have Task v3.23.0+ installed on your system.
|
||||
|
||||
This extension provides the following features (and more):
|
||||
|
||||
- View tasks in the sidebar.
|
||||
- Run tasks from the sidebar and command palette.
|
||||
- Go to definition from the sidebar and command palette.
|
||||
- Run last task command.
|
||||
- Multi-root workspace support.
|
||||
- Initialize a Taskfile in the current workspace.
|
||||
|
||||
To get autocompletion and validation for your Taskfile, see the
|
||||
[Schema](#schema) section below.
|
||||
|
||||

|
||||
|
||||
## Schema
|
||||
|
||||
This was initially created by [@KROSF](https://github.com/KROSF) in
|
||||
[this Gist](https://gist.github.com/KROSF/c5435acf590acd632f71bb720f685895) and
|
||||
is now officially maintained in
|
||||
[this file](https://github.com/go-task/task/blob/main/docs/static/schema.json)
|
||||
and made available at https://taskfile.dev/schema.json. This schema can be used
|
||||
to validate Taskfiles and provide autocompletion in many code editors:
|
||||
|
||||
### Visual Studio Code
|
||||
|
||||
To integrate the schema into VS Code, you need to install the
|
||||
[YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
|
||||
by Red Hat. Any `Taskfile.yml` in your project should automatically be detected
|
||||
and validation/autocompletion should work. If this doesn't work or you want to
|
||||
manually configure it for files with a different name, you can add the following
|
||||
to your `settings.json`:
|
||||
|
||||
```json
|
||||
// settings.json
|
||||
{
|
||||
"yaml.schemas": {
|
||||
"https://taskfile.dev/schema.json": [
|
||||
"**/Taskfile.yml",
|
||||
"./path/to/any/other/taskfile.yml"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can also configure the schema directly inside of a Taskfile by adding the
|
||||
following comment to the top of the file:
|
||||
|
||||
```yaml
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: '3'
|
||||
```
|
||||
|
||||
You can find more information on this in the
|
||||
[YAML language server project](https://github.com/redhat-developer/yaml-language-server).
|
||||
|
||||
## Community Integrations
|
||||
|
||||
In addition to our official integrations, there is an amazing community of
|
||||
developers who have created their own integrations for Task:
|
||||
|
||||
- [Sublime Text Plugin](https://packagecontrol.io/packages/Taskfile)
|
||||
[[source](https://github.com/biozz/sublime-taskfile)] by
|
||||
[@biozz](https://github.com/biozz)
|
||||
- [IntelliJ Plugin](https://plugins.jetbrains.com/plugin/17058-taskfile)
|
||||
[[source](https://github.com/lechuckroh/task-intellij-plugin)] by
|
||||
[@lechuckroh](https://github.com/lechuckroh)
|
||||
- [mk](https://github.com/pycontribs/mk) command line tool recognizes Taskfiles
|
||||
natively.
|
||||
|
||||
If you have made something that integrates with Task, please feel free to open a
|
||||
PR to add it to this list.
|
||||
71
docs/docs/intro.md
Normal file
71
docs/docs/intro.md
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
slug: /
|
||||
sidebar_position: 1
|
||||
title: Home
|
||||
---
|
||||
|
||||
# Task
|
||||
|
||||
<div align="center">
|
||||
<img id="logo" src="img/logo.svg" height="250px" width="250px" />
|
||||
</div>
|
||||
|
||||
Task is a task runner / build tool that aims to be simpler and easier to use
|
||||
than, for example, [GNU Make][make].
|
||||
|
||||
Since it's written in [Go][go], Task is just a single binary and has no other
|
||||
dependencies, which means you don't need to mess with any complicated install
|
||||
setups just to use a build tool.
|
||||
|
||||
Once [installed](installation.md), you just need to describe your build tasks
|
||||
using a simple [YAML][yaml] schema in a file called `Taskfile.yml`:
|
||||
|
||||
```yaml title="Taskfile.yml"
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
hello:
|
||||
cmds:
|
||||
- echo 'Hello World from Task!'
|
||||
silent: true
|
||||
```
|
||||
|
||||
And call it by running `task hello` from your terminal.
|
||||
|
||||
The above example is just the start, you can take a look at the [usage](/usage)
|
||||
guide to check the full schema documentation and Task features.
|
||||
|
||||
## Features
|
||||
|
||||
- [Easy installation](installation.md): just download a single binary, add to
|
||||
`$PATH` and you're done! Or you can also install using [Homebrew][homebrew],
|
||||
[Snapcraft][snapcraft], or [Scoop][scoop] if you want.
|
||||
- Available on CIs: by adding
|
||||
[this simple command](installation.md#install-script) to install on your CI
|
||||
script and you're ready to use Task as part of your CI pipeline;
|
||||
- Truly cross-platform: while most build tools only work well on Linux or macOS,
|
||||
Task also supports Windows thanks to [this shell interpreter for Go][sh].
|
||||
- Great for code generation: you can easily
|
||||
[prevent a task from running](/usage#prevent-unnecessary-work) if a given set
|
||||
of files haven't changed since last run (based either on its timestamp or
|
||||
content).
|
||||
|
||||
## Gold Sponsors
|
||||
|
||||
<div class="gold-sponsors">
|
||||
|
||||
| [Appwrite](https://appwrite.io/?utm_source=taskfile.dev&utm_medium=website&utm_campaign=task_oss_fund) |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [](https://appwrite.io/?utm_source=taskfile.dev&utm_medium=website&utm_campaign=task_oss_fund) |
|
||||
|
||||
</div>
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[make]: https://www.gnu.org/software/make/
|
||||
[go]: https://go.dev/
|
||||
[yaml]: http://yaml.org/
|
||||
[homebrew]: https://brew.sh/
|
||||
[snapcraft]: https://snapcraft.io/
|
||||
[scoop]: https://scoop.sh/
|
||||
[sh]: https://github.com/mvdan/sh
|
||||
<!-- prettier-ignore-end -->
|
||||
63
docs/docs/releasing.md
Normal file
63
docs/docs/releasing.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
slug: /releasing/
|
||||
sidebar_position: 13
|
||||
---
|
||||
|
||||
# Releasing
|
||||
|
||||
The release process of Task is done with the help of [GoReleaser][goreleaser].
|
||||
You can test the release process locally by calling the `test-release` task of
|
||||
the Taskfile.
|
||||
|
||||
[GitHub Actions](https://github.com/go-task/task/actions) should release
|
||||
artifacts automatically when a new Git tag is pushed to `main` branch (raw
|
||||
executables and DEB and RPM packages).
|
||||
|
||||
Since v3.15.0, raw executables can also be reproduced and verified locally by
|
||||
checking out a specific tag and calling `goreleaser build`, using the Go version
|
||||
defined in the above GitHub Actions.
|
||||
|
||||
# Homebrew
|
||||
|
||||
Goreleaser will automatically push a new commit to the
|
||||
[Formula/go-task.rb][gotaskrb] file in the [Homebrew tap][homebrewtap]
|
||||
repository to release the new version.
|
||||
|
||||
# npm
|
||||
|
||||
To release to npm update the version in the [`package.json`][packagejson] file
|
||||
and then run `task npm:publish` to push it.
|
||||
|
||||
# Snapcraft
|
||||
|
||||
The [snap package][snappackage] requires to manual steps to release a new
|
||||
version:
|
||||
|
||||
- Updating the current version on [snapcraft.yaml][snapcraftyaml].
|
||||
- Moving both `amd64`, `armhf` and `arm64` new artifacts to the stable channel
|
||||
on the [Snapcraft dashboard][snapcraftdashboard].
|
||||
|
||||
# Scoop
|
||||
|
||||
Scoop is a command-line package manager for the Windows operating system. Scoop
|
||||
package manifests are maintained by the community. Scoop owners usually take
|
||||
care of updating versions there by editing
|
||||
[this file](https://github.com/ScoopInstaller/Main/blob/master/bucket/task.json).
|
||||
If you think its Task version is outdated, open an issue to let us know.
|
||||
|
||||
# Nix
|
||||
|
||||
Nix is a community owned installation method. Nix package maintainers usually
|
||||
take care of updating versions there by editing
|
||||
[this file](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/tools/go-task/default.nix).
|
||||
If you think its Task version is outdated, open an issue to let us know.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[goreleaser]: https://goreleaser.com/
|
||||
[homebrewtap]: https://github.com/go-task/homebrew-tap
|
||||
[gotaskrb]: https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb
|
||||
[packagejson]: https://github.com/go-task/task/blob/main/package.json#L3
|
||||
[snappackage]: https://github.com/go-task/snap
|
||||
[snapcraftyaml]: https://github.com/go-task/snap/blob/master/snap/snapcraft.yaml#L2
|
||||
[snapcraftdashboard]: https://snapcraft.io/task/releases
|
||||
<!-- prettier-ignore-end -->
|
||||
240
docs/docs/styleguide.md
Normal file
240
docs/docs/styleguide.md
Normal file
@@ -0,0 +1,240 @@
|
||||
---
|
||||
slug: /styleguide/
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Styleguide
|
||||
|
||||
This is the official Task styleguide for `Taskfile.yml` files. This guide
|
||||
contains some basic instructions to keep your Taskfile clean and familiar to
|
||||
other users.
|
||||
|
||||
This contains general guidelines, but they don't necessarily need to be strictly
|
||||
followed. Feel free to disagree and proceed differently at some point if you
|
||||
need or want to. Also, feel free to open issues or pull requests with
|
||||
improvements to this guide.
|
||||
|
||||
## Use `Taskfile.yml` and not `taskfile.yml`
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
taskfile.yml
|
||||
|
||||
|
||||
# good
|
||||
Taskfile.yml
|
||||
```
|
||||
|
||||
This is important especially for Linux users. Windows and macOS have case
|
||||
insensitive filesystems, so `taskfile.yml` will end up working, even that not
|
||||
officially supported. On Linux, only `Taskfile.yml` will work, though.
|
||||
|
||||
## Use the correct order of keywords
|
||||
|
||||
- `version:`
|
||||
- `includes:`
|
||||
- Configuration ones, like `output:`, `silent:`, `method:` and `run:`
|
||||
- `vars:`
|
||||
- `env:`, `dotenv:`
|
||||
- `tasks:`
|
||||
|
||||
## Use 2 spaces for indentation
|
||||
|
||||
This is the most common convention for YAML files, and Task follows it.
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
|
||||
|
||||
# good
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
```
|
||||
|
||||
## Separate with spaces the mains sections
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
includes:
|
||||
docker: ./docker/Taskfile.yml
|
||||
output: prefixed
|
||||
vars:
|
||||
FOO: bar
|
||||
env:
|
||||
BAR: baz
|
||||
tasks:
|
||||
# ...
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
docker: ./docker/Taskfile.yml
|
||||
|
||||
output: prefixed
|
||||
|
||||
vars:
|
||||
FOO: bar
|
||||
|
||||
env:
|
||||
BAR: baz
|
||||
|
||||
tasks:
|
||||
# ...
|
||||
```
|
||||
|
||||
## Add spaces between tasks
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
bar:
|
||||
cmds:
|
||||
- echo 'bar'
|
||||
baz:
|
||||
cmds:
|
||||
- echo 'baz'
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
|
||||
bar:
|
||||
cmds:
|
||||
- echo 'bar'
|
||||
|
||||
baz:
|
||||
cmds:
|
||||
- echo 'baz'
|
||||
```
|
||||
|
||||
## Use upper-case variable names
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
binary_name: myapp
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -o {{.binary_name}} .
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
BINARY_NAME: myapp
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -o {{.BINARY_NAME}} .
|
||||
```
|
||||
|
||||
## Don't wrap vars in spaces when templating
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
cmds:
|
||||
- echo '{{ .MESSAGE }}'
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
cmds:
|
||||
- echo '{{.MESSAGE}}'
|
||||
```
|
||||
|
||||
This convention is also used by most people for any Go templating.
|
||||
|
||||
## Separate task name words with a dash
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
do_something_fancy:
|
||||
cmds:
|
||||
- echo 'Do something'
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
do-something-fancy:
|
||||
cmds:
|
||||
- echo 'Do something'
|
||||
```
|
||||
|
||||
## Use colon for task namespacing
|
||||
|
||||
```yaml
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
docker:build:
|
||||
cmds:
|
||||
- docker ...
|
||||
|
||||
docker:run:
|
||||
cmds:
|
||||
- docker-compose ...
|
||||
```
|
||||
|
||||
This is also done automatically when using included Taskfiles.
|
||||
|
||||
## Prefer external scripts over complex multi-line commands
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- |
|
||||
for i in $(seq 1 10); do
|
||||
echo $i
|
||||
echo "some other complex logic"
|
||||
done'
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- ./scripts/my_complex_script.sh
|
||||
```
|
||||
264
docs/docs/taskfile_versions.md
Normal file
264
docs/docs/taskfile_versions.md
Normal file
@@ -0,0 +1,264 @@
|
||||
---
|
||||
slug: /taskfile-versions/
|
||||
sidebar_position: 14
|
||||
---
|
||||
|
||||
# Taskfile Versions
|
||||
|
||||
The Taskfile syntax and features changed with time. This document explains what
|
||||
changed on each version and how to upgrade your Taskfile.
|
||||
|
||||
## What the Taskfile version mean
|
||||
|
||||
The Taskfile version follows the Task version. E.g. the change to Taskfile
|
||||
version `2` means that Task `v2.0.0` should be release to support it.
|
||||
|
||||
The `version:` key on Taskfile accepts a semver string, so either `2`, `2.0` or
|
||||
`2.0.0` is accepted. If you choose to use `2.0` Task will not enable future
|
||||
`2.1` features, but if you choose to use `2`, then any `2.x.x` features will be
|
||||
available, but not `3.0.0+`.
|
||||
|
||||
## Version 3 
|
||||
|
||||
These are some major changes done on `v3`:
|
||||
|
||||
- Task's output will now be colored
|
||||
- Added support for `.env` like files
|
||||
- Added `label:` setting to task so one can override how the task name appear in
|
||||
the logs
|
||||
- A global `method:` was added to allow setting the default method, and Task's
|
||||
default changed to `checksum`
|
||||
- Two magic variables were added when using `status:`: `CHECKSUM` and
|
||||
`TIMESTAMP` which contains, respectively, the md5 checksum and greatest
|
||||
modification timestamp of the files listed on `sources:`
|
||||
- Also, the `TASK` variable is always available with the current task name
|
||||
- CLI variables are always treated as global variables
|
||||
- Added `dir:` option to `includes` to allow choosing on which directory an
|
||||
included Taskfile will run:
|
||||
|
||||
```yaml
|
||||
includes:
|
||||
docs:
|
||||
taskfile: ./docs
|
||||
dir: ./docs
|
||||
```
|
||||
|
||||
- Implemented short task syntax. All below syntaxes are equivalent:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
print:
|
||||
cmds:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
print:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
print: echo "Hello, World!"
|
||||
```
|
||||
|
||||
- There was a major refactor on how variables are handled. They're now easier to
|
||||
understand. The `expansions:` setting was removed as it became unnecessary.
|
||||
This is the order in which Task will process variables, each level can see the
|
||||
variables set by the previous one and override those.
|
||||
- Environment variables
|
||||
- Global + CLI variables
|
||||
- Call variables
|
||||
- Task variables
|
||||
|
||||
## Version 2.6
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be
|
||||
removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
Version 2.6 comes with `preconditions` stanza in tasks.
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
upload_environment:
|
||||
preconditions:
|
||||
- test -f .env
|
||||
cmds:
|
||||
- aws s3 cp .env s3://myenvironment
|
||||
```
|
||||
|
||||
Please check the [documentation][includes]
|
||||
|
||||
[output]: usage.md#output-syntax
|
||||
[ignore_errors]: usage.md#ignore-errors
|
||||
[includes]: usage.md#including-other-taskfiles
|
||||
|
||||
## Version 2.2
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be
|
||||
removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
Version 2.2 comes with a global `includes` options to include other Taskfiles:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
includes:
|
||||
docs: ./documentation # will look for ./documentation/Taskfile.yml
|
||||
docker: ./DockerTasks.yml
|
||||
```
|
||||
|
||||
## Version 2.1
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be
|
||||
removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
Version 2.1 includes a global `output` option, to allow having more control over
|
||||
how commands output are printed to the console (see [documentation][output] for
|
||||
more info):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
output: prefixed
|
||||
|
||||
tasks:
|
||||
server:
|
||||
cmds:
|
||||
- go run main.go
|
||||
prefix: server
|
||||
```
|
||||
|
||||
From this version it's also possible to ignore errors of a command or task
|
||||
(check documentation [here][ignore_errors]):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
example-1:
|
||||
cmds:
|
||||
- cmd: exit 1
|
||||
ignore_error: true
|
||||
- echo "This will be print"
|
||||
|
||||
example-2:
|
||||
cmds:
|
||||
- exit 1
|
||||
- echo "This will be print"
|
||||
ignore_error: true
|
||||
```
|
||||
|
||||
## Version 2.0
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be
|
||||
removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
At version 2, we introduced the `version:` key, to allow us to evolve Task with
|
||||
new features without breaking existing Taskfiles. The new syntax is as follows:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
echo:
|
||||
cmds:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
Version 2 allows you to write global variables directly in the Taskfile, if you
|
||||
don't want to create a `Taskvars.yml`:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
vars:
|
||||
GREETING: Hello, World!
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
cmds:
|
||||
- echo "{{.GREETING}}"
|
||||
```
|
||||
|
||||
The variable priority order changed to the following:
|
||||
|
||||
1. Task variables
|
||||
2. Call variables
|
||||
3. Taskfile variables
|
||||
4. Taskvars file variables
|
||||
5. Environment variables
|
||||
|
||||
A new global option was added to configure the number of variables expansions
|
||||
(which default to 2):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
expansions: 3
|
||||
|
||||
vars:
|
||||
FOO: foo
|
||||
BAR: bar
|
||||
BAZ: baz
|
||||
FOOBAR: '{{.FOO}}{{.BAR}}'
|
||||
FOOBARBAZ: '{{.FOOBAR}}{{.BAZ}}'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- echo "{{.FOOBARBAZ}}"
|
||||
```
|
||||
|
||||
## Version 1
|
||||
|
||||
:::caution
|
||||
|
||||
v1 schema support was removed in Task >= v3.0.0.
|
||||
|
||||
:::
|
||||
|
||||
In the first version of the `Taskfile`, the `version:` key was not available,
|
||||
because the tasks was in the root of the YAML document. Like this:
|
||||
|
||||
```yaml
|
||||
echo:
|
||||
cmds:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
The variable priority order was also different:
|
||||
|
||||
1. Call variables
|
||||
2. Environment
|
||||
3. Task variables
|
||||
4. `Taskvars.yml` variables
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
<!-- prettier-ignore-end -->
|
||||
22
docs/docs/translate.md
Normal file
22
docs/docs/translate.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
slug: /translate/
|
||||
sidebar_position: 12
|
||||
---
|
||||
|
||||
# Translate
|
||||
|
||||
Want to help us translate this documentation? In this document we explain how.
|
||||
|
||||
Do NOT edit translated markdown files directly on the GitHub repository! We use
|
||||
[Crowdin][crowdin] to allow contributors on work on translations. The repository
|
||||
is periodically updated with progress from Crowdin.
|
||||
|
||||
If you want to have access to the Crowdin project to be able to suggest
|
||||
translations, please ask for access on the [#translations channel on our Discord
|
||||
server][discord]. If a given language is not being shown to Crowdin yet, just
|
||||
ask and we can configure it.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[crowdin]: https://crowdin.com/project/taskfile
|
||||
[discord]: https://discord.gg/6TY36E39UK
|
||||
<!-- prettier-ignore-end -->
|
||||
1594
docs/docs/usage.md
Normal file
1594
docs/docs/usage.md
Normal file
File diff suppressed because it is too large
Load Diff
232
docs/docusaurus.config.js
Normal file
232
docs/docusaurus.config.js
Normal file
@@ -0,0 +1,232 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const {
|
||||
DISCORD_URL,
|
||||
GITHUB_URL,
|
||||
MASTODON_URL,
|
||||
TWITTER_URL
|
||||
} = require('./constants');
|
||||
const lightCodeTheme = require('./src/themes/prismLight');
|
||||
const darkCodeTheme = require('./src/themes/prismDark');
|
||||
|
||||
const { getTranslationProgress } = require('./src/api/crowdin.js');
|
||||
|
||||
const getConfig = async () => {
|
||||
const translationProgress = await getTranslationProgress();
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Task',
|
||||
tagline: 'A task runner / simpler Make alternative written in Go ',
|
||||
url: 'https://taskfile.dev',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'throw',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
organizationName: 'go-task',
|
||||
projectName: 'task',
|
||||
deploymentBranch: 'gh-pages',
|
||||
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'fr-FR', 'pt-BR', 'ru-RU', 'es-ES', 'zh-Hans'],
|
||||
localeConfigs: {
|
||||
en: {
|
||||
label: 'English',
|
||||
direction: 'ltr',
|
||||
htmlLang: 'en-US'
|
||||
},
|
||||
'fr-FR': {
|
||||
label: `Français (${translationProgress['fr'] || 0}%)`,
|
||||
direction: 'ltr',
|
||||
htmlLang: 'fr-FR'
|
||||
},
|
||||
'pt-BR': {
|
||||
label: `Português (${translationProgress['pt-BR'] || 0}%)`,
|
||||
direction: 'ltr',
|
||||
htmlLang: 'pt-BR'
|
||||
},
|
||||
'ru-RU': {
|
||||
label: `Pусский (${translationProgress['ru'] || 0}%)`,
|
||||
direction: 'ltr',
|
||||
htmlLang: 'ru-RU'
|
||||
},
|
||||
'es-ES': {
|
||||
label: `Español (${translationProgress['es-ES'] || 0}%)`,
|
||||
direction: 'ltr',
|
||||
htmlLang: 'es-ES'
|
||||
},
|
||||
'zh-Hans': {
|
||||
label: `简体中文 (${translationProgress['zh-CN'] || 0}%)`,
|
||||
direction: 'ltr',
|
||||
htmlLang: 'zh-Hans'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
routeBasePath: '/',
|
||||
sidebarPath: require.resolve('./sidebars.js')
|
||||
},
|
||||
blog: false,
|
||||
theme: {
|
||||
customCss: [require.resolve('./src/css/custom.css')]
|
||||
},
|
||||
gtag: {
|
||||
trackingID: 'G-4RT25NXQ7N',
|
||||
anonymizeIP: true
|
||||
},
|
||||
sitemap: {
|
||||
changefreq: 'weekly',
|
||||
priority: 0.5,
|
||||
ignorePatterns: ['/tags/**']
|
||||
}
|
||||
})
|
||||
]
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
metadata: [
|
||||
{
|
||||
name: 'og:image',
|
||||
content: 'https://taskfile.dev/img/og-image.png'
|
||||
}
|
||||
],
|
||||
navbar: {
|
||||
title: 'Task',
|
||||
logo: {
|
||||
alt: 'Task Logo',
|
||||
src: 'img/logo.svg'
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'installation',
|
||||
position: 'left',
|
||||
label: 'Installation'
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'usage',
|
||||
position: 'left',
|
||||
label: 'Usage'
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'api_reference',
|
||||
position: 'left',
|
||||
label: 'API'
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'donate',
|
||||
position: 'left',
|
||||
label: 'Donate'
|
||||
},
|
||||
{
|
||||
type: 'localeDropdown',
|
||||
position: 'left',
|
||||
dropdownItemsAfter: [
|
||||
{
|
||||
to: '/translate/',
|
||||
label: 'Help Us Translate'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
href: GITHUB_URL,
|
||||
label: 'GitHub',
|
||||
position: 'right'
|
||||
},
|
||||
{
|
||||
href: TWITTER_URL,
|
||||
label: 'Twitter',
|
||||
position: 'right'
|
||||
},
|
||||
{
|
||||
href: MASTODON_URL,
|
||||
label: 'Mastodon',
|
||||
rel: 'me',
|
||||
position: 'right'
|
||||
},
|
||||
{
|
||||
href: DISCORD_URL,
|
||||
label: 'Discord',
|
||||
position: 'right'
|
||||
}
|
||||
]
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Pages',
|
||||
items: [
|
||||
{
|
||||
label: 'Installation',
|
||||
to: '/installation/'
|
||||
},
|
||||
{
|
||||
label: 'Usage',
|
||||
to: '/usage/'
|
||||
},
|
||||
{
|
||||
label: 'Donate',
|
||||
to: '/donate/'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: GITHUB_URL
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
href: TWITTER_URL
|
||||
},
|
||||
{
|
||||
label: 'Mastodon',
|
||||
href: MASTODON_URL,
|
||||
rel: 'me'
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: DISCORD_URL
|
||||
},
|
||||
{
|
||||
label: 'OpenCollective',
|
||||
href: 'https://opencollective.com/task'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme
|
||||
},
|
||||
// NOTE(@andreynering): Don't worry, these keys are meant to be public =)
|
||||
algolia: {
|
||||
appId: '7IZIJ13AI7',
|
||||
apiKey: '34b64ae4fc8d9da43d9a13d9710aaddc',
|
||||
indexName: 'taskfile'
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
module.exports = getConfig;
|
||||
@@ -1,7 +0,0 @@
|
||||
# Examples
|
||||
|
||||
The [go-task/examples][examples] intends to be a collection of Taskfiles for
|
||||
various use cases.
|
||||
(It still lacks many examples, though. Contributions are welcome).
|
||||
|
||||
[examples]: https://github.com/go-task/examples
|
||||
BIN
docs/favicon.ico
BIN
docs/favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 136 KiB |
396
docs/i18n/en/code.json
Normal file
396
docs/i18n/en/code.json
Normal file
@@ -0,0 +1,396 @@
|
||||
{
|
||||
"theme.ErrorPageContent.title": {
|
||||
"message": "This page crashed.",
|
||||
"description": "The title of the fallback page when the page crashed"
|
||||
},
|
||||
"theme.ErrorPageContent.tryAgain": {
|
||||
"message": "Try again",
|
||||
"description": "The label of the button to try again when the page crashed"
|
||||
},
|
||||
"theme.NotFound.title": {
|
||||
"message": "Page Not Found",
|
||||
"description": "The title of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p1": {
|
||||
"message": "We could not find what you were looking for.",
|
||||
"description": "The first paragraph of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p2": {
|
||||
"message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
|
||||
"description": "The 2nd paragraph of the 404 page"
|
||||
},
|
||||
"theme.admonition.note": {
|
||||
"message": "note",
|
||||
"description": "The default label used for the Note admonition (:::note)"
|
||||
},
|
||||
"theme.admonition.tip": {
|
||||
"message": "tip",
|
||||
"description": "The default label used for the Tip admonition (:::tip)"
|
||||
},
|
||||
"theme.admonition.danger": {
|
||||
"message": "danger",
|
||||
"description": "The default label used for the Danger admonition (:::danger)"
|
||||
},
|
||||
"theme.admonition.info": {
|
||||
"message": "info",
|
||||
"description": "The default label used for the Info admonition (:::info)"
|
||||
},
|
||||
"theme.admonition.caution": {
|
||||
"message": "caution",
|
||||
"description": "The default label used for the Caution admonition (:::caution)"
|
||||
},
|
||||
"theme.BackToTopButton.buttonAriaLabel": {
|
||||
"message": "Scroll back to top",
|
||||
"description": "The ARIA label for the back to top button"
|
||||
},
|
||||
"theme.blog.archive.title": {
|
||||
"message": "Archive",
|
||||
"description": "The page & hero title of the blog archive page"
|
||||
},
|
||||
"theme.blog.archive.description": {
|
||||
"message": "Archive",
|
||||
"description": "The page & hero description of the blog archive page"
|
||||
},
|
||||
"theme.blog.paginator.navAriaLabel": {
|
||||
"message": "Blog list page navigation",
|
||||
"description": "The ARIA label for the blog pagination"
|
||||
},
|
||||
"theme.blog.paginator.newerEntries": {
|
||||
"message": "Newer Entries",
|
||||
"description": "The label used to navigate to the newer blog posts page (previous page)"
|
||||
},
|
||||
"theme.blog.paginator.olderEntries": {
|
||||
"message": "Older Entries",
|
||||
"description": "The label used to navigate to the older blog posts page (next page)"
|
||||
},
|
||||
"theme.blog.post.paginator.navAriaLabel": {
|
||||
"message": "Blog post page navigation",
|
||||
"description": "The ARIA label for the blog posts pagination"
|
||||
},
|
||||
"theme.blog.post.paginator.newerPost": {
|
||||
"message": "Newer Post",
|
||||
"description": "The blog post button label to navigate to the newer/previous post"
|
||||
},
|
||||
"theme.blog.post.paginator.olderPost": {
|
||||
"message": "Older Post",
|
||||
"description": "The blog post button label to navigate to the older/next post"
|
||||
},
|
||||
"theme.blog.post.plurals": {
|
||||
"message": "One post|{count} posts",
|
||||
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.blog.tagTitle": {
|
||||
"message": "{nPosts} tagged with \"{tagName}\"",
|
||||
"description": "The title of the page for a blog tag"
|
||||
},
|
||||
"theme.tags.tagsPageLink": {
|
||||
"message": "View All Tags",
|
||||
"description": "The label of the link targeting the tag list page"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel": {
|
||||
"message": "Switch between dark and light mode (currently {mode})",
|
||||
"description": "The ARIA label for the navbar color mode toggle"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.dark": {
|
||||
"message": "dark mode",
|
||||
"description": "The name for the dark color mode"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.light": {
|
||||
"message": "light mode",
|
||||
"description": "The name for the light color mode"
|
||||
},
|
||||
"theme.docs.breadcrumbs.home": {
|
||||
"message": "Home page",
|
||||
"description": "The ARIA label for the home page in the breadcrumbs"
|
||||
},
|
||||
"theme.docs.breadcrumbs.navAriaLabel": {
|
||||
"message": "Breadcrumbs",
|
||||
"description": "The ARIA label for the breadcrumbs"
|
||||
},
|
||||
"theme.docs.DocCard.categoryDescription": {
|
||||
"message": "{count} items",
|
||||
"description": "The default description for a category card in the generated index about how many items this category includes"
|
||||
},
|
||||
"theme.docs.paginator.navAriaLabel": {
|
||||
"message": "Docs pages navigation",
|
||||
"description": "The ARIA label for the docs pagination"
|
||||
},
|
||||
"theme.docs.paginator.previous": {
|
||||
"message": "Previous",
|
||||
"description": "The label used to navigate to the previous doc"
|
||||
},
|
||||
"theme.docs.paginator.next": {
|
||||
"message": "Next",
|
||||
"description": "The label used to navigate to the next doc"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle.nDocsTagged": {
|
||||
"message": "One doc tagged|{count} docs tagged",
|
||||
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle": {
|
||||
"message": "{nDocsTagged} with \"{tagName}\"",
|
||||
"description": "The title of the page for a docs tag"
|
||||
},
|
||||
"theme.docs.versionBadge.label": {
|
||||
"message": "Version: {versionLabel}"
|
||||
},
|
||||
"theme.docs.versions.unreleasedVersionLabel": {
|
||||
"message": "This is unreleased documentation for {siteTitle} {versionLabel} version.",
|
||||
"description": "The label used to tell the user that he's browsing an unreleased doc version"
|
||||
},
|
||||
"theme.docs.versions.unmaintainedVersionLabel": {
|
||||
"message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.",
|
||||
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionSuggestionLabel": {
|
||||
"message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).",
|
||||
"description": "The label used to tell the user to check the latest version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionLinkLabel": {
|
||||
"message": "latest version",
|
||||
"description": "The label used for the latest version suggestion link label"
|
||||
},
|
||||
"theme.common.editThisPage": {
|
||||
"message": "Edit this page",
|
||||
"description": "The link label to edit the current page"
|
||||
},
|
||||
"theme.common.headingLinkTitle": {
|
||||
"message": "Direct link to heading",
|
||||
"description": "Title for link to heading"
|
||||
},
|
||||
"theme.lastUpdated.atDate": {
|
||||
"message": " on {date}",
|
||||
"description": "The words used to describe on which date a page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.byUser": {
|
||||
"message": " by {user}",
|
||||
"description": "The words used to describe by who the page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.lastUpdatedAtBy": {
|
||||
"message": "Last updated{atDate}{byUser}",
|
||||
"description": "The sentence used to display when a page has been last updated, and by who"
|
||||
},
|
||||
"theme.navbar.mobileVersionsDropdown.label": {
|
||||
"message": "Versions",
|
||||
"description": "The label for the navbar versions dropdown on mobile view"
|
||||
},
|
||||
"theme.tags.tagsListLabel": {
|
||||
"message": "Tags:",
|
||||
"description": "The label alongside a tag list"
|
||||
},
|
||||
"theme.AnnouncementBar.closeButtonAriaLabel": {
|
||||
"message": "Close",
|
||||
"description": "The ARIA label for close button of announcement bar"
|
||||
},
|
||||
"theme.blog.sidebar.navAriaLabel": {
|
||||
"message": "Blog recent posts navigation",
|
||||
"description": "The ARIA label for recent posts in the blog sidebar"
|
||||
},
|
||||
"theme.CodeBlock.copied": {
|
||||
"message": "Copied",
|
||||
"description": "The copied button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.copyButtonAriaLabel": {
|
||||
"message": "Copy code to clipboard",
|
||||
"description": "The ARIA label for copy code blocks button"
|
||||
},
|
||||
"theme.CodeBlock.copy": {
|
||||
"message": "Copy",
|
||||
"description": "The copy button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.wordWrapToggle": {
|
||||
"message": "Toggle word wrap",
|
||||
"description": "The title attribute for toggle word wrapping button of code block lines"
|
||||
},
|
||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
|
||||
"message": "Toggle the collapsible sidebar category '{label}'",
|
||||
"description": "The ARIA label to toggle the collapsible sidebar category"
|
||||
},
|
||||
"theme.navbar.mobileLanguageDropdown.label": {
|
||||
"message": "Languages",
|
||||
"description": "The label for the mobile language switcher dropdown"
|
||||
},
|
||||
"theme.TOCCollapsible.toggleButtonLabel": {
|
||||
"message": "On this page",
|
||||
"description": "The label used by the button on the collapsible TOC component"
|
||||
},
|
||||
"theme.blog.post.readMore": {
|
||||
"message": "Read More",
|
||||
"description": "The label used in blog post item excerpts to link to full blog posts"
|
||||
},
|
||||
"theme.blog.post.readMoreLabel": {
|
||||
"message": "Read more about {title}",
|
||||
"description": "The ARIA label for the link to full blog posts from excerpts"
|
||||
},
|
||||
"theme.blog.post.readingTime.plurals": {
|
||||
"message": "One min read|{readingTime} min read",
|
||||
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonTitle": {
|
||||
"message": "Collapse sidebar",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonAriaLabel": {
|
||||
"message": "Collapse sidebar",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
|
||||
"message": "Close navigation bar",
|
||||
"description": "The ARIA label for close button of mobile sidebar"
|
||||
},
|
||||
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
|
||||
"message": "← Back to main menu",
|
||||
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
|
||||
},
|
||||
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
|
||||
"message": "Toggle navigation bar",
|
||||
"description": "The ARIA label for hamburger menu button of mobile navigation"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonTitle": {
|
||||
"message": "Expand sidebar",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonAriaLabel": {
|
||||
"message": "Expand sidebar",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.SearchBar.seeAll": {
|
||||
"message": "See all {count} results"
|
||||
},
|
||||
"theme.SearchPage.documentsFound.plurals": {
|
||||
"message": "One document found|{count} documents found",
|
||||
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.SearchPage.existingResultsTitle": {
|
||||
"message": "Search results for \"{query}\"",
|
||||
"description": "The search page title for non-empty query"
|
||||
},
|
||||
"theme.SearchPage.emptyResultsTitle": {
|
||||
"message": "Search the documentation",
|
||||
"description": "The search page title for empty query"
|
||||
},
|
||||
"theme.SearchPage.inputPlaceholder": {
|
||||
"message": "Type your search here",
|
||||
"description": "The placeholder for search page input"
|
||||
},
|
||||
"theme.SearchPage.inputLabel": {
|
||||
"message": "Search",
|
||||
"description": "The ARIA label for search page input"
|
||||
},
|
||||
"theme.SearchPage.algoliaLabel": {
|
||||
"message": "Search by Algolia",
|
||||
"description": "The ARIA label for Algolia mention"
|
||||
},
|
||||
"theme.SearchPage.noResultsText": {
|
||||
"message": "No results were found",
|
||||
"description": "The paragraph for empty search result"
|
||||
},
|
||||
"theme.SearchPage.fetchingNewResults": {
|
||||
"message": "Fetching new results...",
|
||||
"description": "The paragraph for fetching new search results"
|
||||
},
|
||||
"theme.SearchBar.label": {
|
||||
"message": "Search",
|
||||
"description": "The ARIA label and placeholder for search button"
|
||||
},
|
||||
"theme.SearchModal.searchBox.resetButtonTitle": {
|
||||
"message": "Clear the query",
|
||||
"description": "The label and ARIA label for search box reset button"
|
||||
},
|
||||
"theme.SearchModal.searchBox.cancelButtonText": {
|
||||
"message": "Cancel",
|
||||
"description": "The label and ARIA label for search box cancel button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.recentSearchesTitle": {
|
||||
"message": "Recent",
|
||||
"description": "The title for recent searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.noRecentSearchesText": {
|
||||
"message": "No recent searches",
|
||||
"description": "The text when no recent searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": {
|
||||
"message": "Save this search",
|
||||
"description": "The label for save recent search button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": {
|
||||
"message": "Remove this search from history",
|
||||
"description": "The label for remove recent search button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.favoriteSearchesTitle": {
|
||||
"message": "Favorite",
|
||||
"description": "The title for favorite searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": {
|
||||
"message": "Remove this search from favorites",
|
||||
"description": "The label for remove favorite search button"
|
||||
},
|
||||
"theme.SearchModal.errorScreen.titleText": {
|
||||
"message": "Unable to fetch results",
|
||||
"description": "The title for error screen of search modal"
|
||||
},
|
||||
"theme.SearchModal.errorScreen.helpText": {
|
||||
"message": "You might want to check your network connection.",
|
||||
"description": "The help text for error screen of search modal"
|
||||
},
|
||||
"theme.SearchModal.footer.selectText": {
|
||||
"message": "to select",
|
||||
"description": "The explanatory text of the action for the enter key"
|
||||
},
|
||||
"theme.SearchModal.footer.selectKeyAriaLabel": {
|
||||
"message": "Enter key",
|
||||
"description": "The ARIA label for the Enter key button that makes the selection"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateText": {
|
||||
"message": "to navigate",
|
||||
"description": "The explanatory text of the action for the Arrow up and Arrow down key"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateUpKeyAriaLabel": {
|
||||
"message": "Arrow up",
|
||||
"description": "The ARIA label for the Arrow up key button that makes the navigation"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateDownKeyAriaLabel": {
|
||||
"message": "Arrow down",
|
||||
"description": "The ARIA label for the Arrow down key button that makes the navigation"
|
||||
},
|
||||
"theme.SearchModal.footer.closeText": {
|
||||
"message": "to close",
|
||||
"description": "The explanatory text of the action for Escape key"
|
||||
},
|
||||
"theme.SearchModal.footer.closeKeyAriaLabel": {
|
||||
"message": "Escape key",
|
||||
"description": "The ARIA label for the Escape key button that close the modal"
|
||||
},
|
||||
"theme.SearchModal.footer.searchByText": {
|
||||
"message": "Search by",
|
||||
"description": "The text explain that the search is making by Algolia"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.noResultsText": {
|
||||
"message": "No results for",
|
||||
"description": "The text explains that there are no results for the following search"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.suggestedQueryText": {
|
||||
"message": "Try searching for",
|
||||
"description": "The text for the suggested query when no results are found for the following search"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.reportMissingResultsText": {
|
||||
"message": "Believe this query should return results?",
|
||||
"description": "The text for the question where the user thinks there are missing results"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": {
|
||||
"message": "Let us know.",
|
||||
"description": "The text for the link to report missing results"
|
||||
},
|
||||
"theme.SearchModal.placeholder": {
|
||||
"message": "Search docs",
|
||||
"description": "The placeholder of the input of the DocSearch pop-up modal"
|
||||
},
|
||||
"theme.common.skipToMainContent": {
|
||||
"message": "Skip to main content",
|
||||
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
|
||||
},
|
||||
"theme.tags.tagsPageTitle": {
|
||||
"message": "Tags",
|
||||
"description": "The title of the tag list page"
|
||||
}
|
||||
}
|
||||
6
docs/i18n/en/docusaurus-plugin-content-docs/current.json
Normal file
6
docs/i18n/en/docusaurus-plugin-content-docs/current.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version.label": {
|
||||
"message": "Next",
|
||||
"description": "The label for version current"
|
||||
}
|
||||
}
|
||||
46
docs/i18n/en/docusaurus-theme-classic/footer.json
Normal file
46
docs/i18n/en/docusaurus-theme-classic/footer.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"link.title.Pages": {
|
||||
"message": "Pages",
|
||||
"description": "The title of the footer links column with title=Pages in the footer"
|
||||
},
|
||||
"link.title.Community": {
|
||||
"message": "Community",
|
||||
"description": "The title of the footer links column with title=Community in the footer"
|
||||
},
|
||||
"link.title.Translations": {
|
||||
"message": "Translations",
|
||||
"description": "The title of the footer links column with title=Translations in the footer"
|
||||
},
|
||||
"link.item.label.Installation": {
|
||||
"message": "Installation",
|
||||
"description": "The label of footer link with label=Installation linking to /installation/"
|
||||
},
|
||||
"link.item.label.Usage": {
|
||||
"message": "Usage",
|
||||
"description": "The label of footer link with label=Usage linking to /usage/"
|
||||
},
|
||||
"link.item.label.Donate": {
|
||||
"message": "Donate",
|
||||
"description": "The label of footer link with label=Donate linking to /donate/"
|
||||
},
|
||||
"link.item.label.GitHub": {
|
||||
"message": "GitHub",
|
||||
"description": "The label of footer link with label=GitHub linking to https://github.com/go-task/task"
|
||||
},
|
||||
"link.item.label.Twitter": {
|
||||
"message": "Twitter",
|
||||
"description": "The label of footer link with label=Twitter linking to https://twitter.com/taskfiledev"
|
||||
},
|
||||
"link.item.label.Mastodon": {
|
||||
"message": "Mastodon",
|
||||
"description": "The label of footer link with label=Mastodon linking to https://fosstodon.org/@task"
|
||||
},
|
||||
"link.item.label.Discord": {
|
||||
"message": "Discord",
|
||||
"description": "The label of footer link with label=Discord linking to https://discord.gg/6TY36E39UK"
|
||||
},
|
||||
"link.item.label.OpenCollective": {
|
||||
"message": "OpenCollective",
|
||||
"description": "The label of footer link with label=OpenCollective linking to https://opencollective.com/task"
|
||||
}
|
||||
}
|
||||
38
docs/i18n/en/docusaurus-theme-classic/navbar.json
Normal file
38
docs/i18n/en/docusaurus-theme-classic/navbar.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"title": {
|
||||
"message": "Task",
|
||||
"description": "The title in the navbar"
|
||||
},
|
||||
"item.label.Installation": {
|
||||
"message": "Installation",
|
||||
"description": "Navbar item with label Installation"
|
||||
},
|
||||
"item.label.Usage": {
|
||||
"message": "Usage",
|
||||
"description": "Navbar item with label Usage"
|
||||
},
|
||||
"item.label.API": {
|
||||
"message": "API",
|
||||
"description": "Navbar item with label API"
|
||||
},
|
||||
"item.label.Donate": {
|
||||
"message": "Donate",
|
||||
"description": "Navbar item with label Donate"
|
||||
},
|
||||
"item.label.GitHub": {
|
||||
"message": "GitHub",
|
||||
"description": "Navbar item with label GitHub"
|
||||
},
|
||||
"item.label.Twitter": {
|
||||
"message": "Twitter",
|
||||
"description": "Navbar item with label Twitter"
|
||||
},
|
||||
"item.label.Mastodon": {
|
||||
"message": "Mastodon",
|
||||
"description": "Navbar item with label Mastodon"
|
||||
},
|
||||
"item.label.Discord": {
|
||||
"message": "Discord",
|
||||
"description": "Navbar item with label Discord"
|
||||
}
|
||||
}
|
||||
396
docs/i18n/es-ES/code.json
Normal file
396
docs/i18n/es-ES/code.json
Normal file
@@ -0,0 +1,396 @@
|
||||
{
|
||||
"theme.ErrorPageContent.title": {
|
||||
"message": "Ha ocurrido un error con la página.",
|
||||
"description": "The title of the fallback page when the page crashed"
|
||||
},
|
||||
"theme.ErrorPageContent.tryAgain": {
|
||||
"message": "Volver a intentarlo",
|
||||
"description": "The label of the button to try again when the page crashed"
|
||||
},
|
||||
"theme.NotFound.title": {
|
||||
"message": "Página No Encontrada",
|
||||
"description": "The title of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p1": {
|
||||
"message": "No pudimos encontrar lo que estabas buscando.",
|
||||
"description": "The first paragraph of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p2": {
|
||||
"message": "Por favor, contacta con el propietario del sitio al que está enlazada la URL original y comunícale que el enlace está roto.",
|
||||
"description": "The 2nd paragraph of the 404 page"
|
||||
},
|
||||
"theme.admonition.note": {
|
||||
"message": "nota",
|
||||
"description": "The default label used for the Note admonition (:::note)"
|
||||
},
|
||||
"theme.admonition.tip": {
|
||||
"message": "pista",
|
||||
"description": "The default label used for the Tip admonition (:::tip)"
|
||||
},
|
||||
"theme.admonition.danger": {
|
||||
"message": "peligro",
|
||||
"description": "The default label used for the Danger admonition (:::danger)"
|
||||
},
|
||||
"theme.admonition.info": {
|
||||
"message": "información",
|
||||
"description": "The default label used for the Info admonition (:::info)"
|
||||
},
|
||||
"theme.admonition.caution": {
|
||||
"message": "precaución",
|
||||
"description": "The default label used for the Caution admonition (:::caution)"
|
||||
},
|
||||
"theme.BackToTopButton.buttonAriaLabel": {
|
||||
"message": "Volver arriba",
|
||||
"description": "The ARIA label for the back to top button"
|
||||
},
|
||||
"theme.blog.archive.title": {
|
||||
"message": "Archivo",
|
||||
"description": "The page & hero title of the blog archive page"
|
||||
},
|
||||
"theme.blog.archive.description": {
|
||||
"message": "Archivo",
|
||||
"description": "The page & hero description of the blog archive page"
|
||||
},
|
||||
"theme.blog.paginator.navAriaLabel": {
|
||||
"message": "Navegación por la página de la lista de blogs ",
|
||||
"description": "The ARIA label for the blog pagination"
|
||||
},
|
||||
"theme.blog.paginator.newerEntries": {
|
||||
"message": "Entradas más recientes",
|
||||
"description": "The label used to navigate to the newer blog posts page (previous page)"
|
||||
},
|
||||
"theme.blog.paginator.olderEntries": {
|
||||
"message": "Entradas antiguas",
|
||||
"description": "The label used to navigate to the older blog posts page (next page)"
|
||||
},
|
||||
"theme.blog.post.paginator.navAriaLabel": {
|
||||
"message": "Barra de paginación de publicaciones del blog",
|
||||
"description": "The ARIA label for the blog posts pagination"
|
||||
},
|
||||
"theme.blog.post.paginator.newerPost": {
|
||||
"message": "Publicación más reciente",
|
||||
"description": "The blog post button label to navigate to the newer/previous post"
|
||||
},
|
||||
"theme.blog.post.paginator.olderPost": {
|
||||
"message": "Publicación más antigua",
|
||||
"description": "The blog post button label to navigate to the older/next post"
|
||||
},
|
||||
"theme.blog.post.plurals": {
|
||||
"message": "Una publicación|{count} publicaciones",
|
||||
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.blog.tagTitle": {
|
||||
"message": "{nPosts} etiquetados con \"{tagName}\"",
|
||||
"description": "The title of the page for a blog tag"
|
||||
},
|
||||
"theme.tags.tagsPageLink": {
|
||||
"message": "Ver Todas las Etiquetas",
|
||||
"description": "The label of the link targeting the tag list page"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel": {
|
||||
"message": "Cambiar entre modo oscuro y claro (actualmente {mode})",
|
||||
"description": "The ARIA label for the navbar color mode toggle"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.dark": {
|
||||
"message": "modo oscuro",
|
||||
"description": "The name for the dark color mode"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.light": {
|
||||
"message": "modo claro",
|
||||
"description": "The name for the light color mode"
|
||||
},
|
||||
"theme.docs.breadcrumbs.home": {
|
||||
"message": "Página de inicio",
|
||||
"description": "The ARIA label for the home page in the breadcrumbs"
|
||||
},
|
||||
"theme.docs.breadcrumbs.navAriaLabel": {
|
||||
"message": "Breadcrumbs",
|
||||
"description": "The ARIA label for the breadcrumbs"
|
||||
},
|
||||
"theme.docs.DocCard.categoryDescription": {
|
||||
"message": "{count} items",
|
||||
"description": "The default description for a category card in the generated index about how many items this category includes"
|
||||
},
|
||||
"theme.docs.paginator.navAriaLabel": {
|
||||
"message": "Navegación de páginas de documentos",
|
||||
"description": "The ARIA label for the docs pagination"
|
||||
},
|
||||
"theme.docs.paginator.previous": {
|
||||
"message": "Anterior",
|
||||
"description": "The label used to navigate to the previous doc"
|
||||
},
|
||||
"theme.docs.paginator.next": {
|
||||
"message": "Siguiente",
|
||||
"description": "The label used to navigate to the next doc"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle.nDocsTagged": {
|
||||
"message": "Un documento etiquetado|{count} documentos etiquetados",
|
||||
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle": {
|
||||
"message": "{nDocsTagged} con \"{tagName}\"",
|
||||
"description": "The title of the page for a docs tag"
|
||||
},
|
||||
"theme.docs.versionBadge.label": {
|
||||
"message": "Versión: {versionLabel}"
|
||||
},
|
||||
"theme.docs.versions.unreleasedVersionLabel": {
|
||||
"message": "Esta es documentación sin liberar para {siteTitle} {versionLabel} versión.",
|
||||
"description": "The label used to tell the user that he's browsing an unreleased doc version"
|
||||
},
|
||||
"theme.docs.versions.unmaintainedVersionLabel": {
|
||||
"message": "Esta es documentación para {siteTitle} {versionLabel}, que ya no se mantiene activamente.",
|
||||
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionSuggestionLabel": {
|
||||
"message": "Para la documentación actualizada, vea {latestVersionLink} ({versionLabel}).",
|
||||
"description": "The label used to tell the user to check the latest version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionLinkLabel": {
|
||||
"message": "última versión",
|
||||
"description": "The label used for the latest version suggestion link label"
|
||||
},
|
||||
"theme.common.editThisPage": {
|
||||
"message": "Editar esta página",
|
||||
"description": "The link label to edit the current page"
|
||||
},
|
||||
"theme.common.headingLinkTitle": {
|
||||
"message": "Enlace directo al {heading}",
|
||||
"description": "Title for link to heading"
|
||||
},
|
||||
"theme.lastUpdated.atDate": {
|
||||
"message": " en {date}",
|
||||
"description": "The words used to describe on which date a page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.byUser": {
|
||||
"message": " por {user}",
|
||||
"description": "The words used to describe by who the page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.lastUpdatedAtBy": {
|
||||
"message": "Última actualización{atDate}{byUser}",
|
||||
"description": "The sentence used to display when a page has been last updated, and by who"
|
||||
},
|
||||
"theme.navbar.mobileVersionsDropdown.label": {
|
||||
"message": "Versiones",
|
||||
"description": "The label for the navbar versions dropdown on mobile view"
|
||||
},
|
||||
"theme.tags.tagsListLabel": {
|
||||
"message": "Etiquetas:",
|
||||
"description": "The label alongside a tag list"
|
||||
},
|
||||
"theme.AnnouncementBar.closeButtonAriaLabel": {
|
||||
"message": "Cerrar",
|
||||
"description": "The ARIA label for close button of announcement bar"
|
||||
},
|
||||
"theme.blog.sidebar.navAriaLabel": {
|
||||
"message": "Navegación de publicaciones recientes",
|
||||
"description": "The ARIA label for recent posts in the blog sidebar"
|
||||
},
|
||||
"theme.CodeBlock.copied": {
|
||||
"message": "Copiado",
|
||||
"description": "The copied button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.copyButtonAriaLabel": {
|
||||
"message": "Copiar código al portapapeles",
|
||||
"description": "The ARIA label for copy code blocks button"
|
||||
},
|
||||
"theme.CodeBlock.copy": {
|
||||
"message": "Copiar",
|
||||
"description": "The copy button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.wordWrapToggle": {
|
||||
"message": "Toggle word wrap",
|
||||
"description": "The title attribute for toggle word wrapping button of code block lines"
|
||||
},
|
||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
|
||||
"message": "Toggle the collapsible sidebar category '{label}'",
|
||||
"description": "The ARIA label to toggle the collapsible sidebar category"
|
||||
},
|
||||
"theme.navbar.mobileLanguageDropdown.label": {
|
||||
"message": "Languages",
|
||||
"description": "The label for the mobile language switcher dropdown"
|
||||
},
|
||||
"theme.TOCCollapsible.toggleButtonLabel": {
|
||||
"message": "En esta página",
|
||||
"description": "The label used by the button on the collapsible TOC component"
|
||||
},
|
||||
"theme.blog.post.readMore": {
|
||||
"message": "Leer Más",
|
||||
"description": "The label used in blog post item excerpts to link to full blog posts"
|
||||
},
|
||||
"theme.blog.post.readMoreLabel": {
|
||||
"message": "Read more about {title}",
|
||||
"description": "The ARIA label for the link to full blog posts from excerpts"
|
||||
},
|
||||
"theme.blog.post.readingTime.plurals": {
|
||||
"message": "Lectura de un minuto|{readingTime} min de lectura",
|
||||
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonTitle": {
|
||||
"message": "Colapsar barra lateral",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonAriaLabel": {
|
||||
"message": "Colapsar barra lateral",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
|
||||
"message": "Close navigation bar",
|
||||
"description": "The ARIA label for close button of mobile sidebar"
|
||||
},
|
||||
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
|
||||
"message": "← Volver al menú principal",
|
||||
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
|
||||
},
|
||||
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
|
||||
"message": "Toggle navigation bar",
|
||||
"description": "The ARIA label for hamburger menu button of mobile navigation"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonTitle": {
|
||||
"message": "Expandir barra lateral",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonAriaLabel": {
|
||||
"message": "Expandir barra lateral",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.SearchBar.seeAll": {
|
||||
"message": "See all {count} results"
|
||||
},
|
||||
"theme.SearchPage.documentsFound.plurals": {
|
||||
"message": "Un documento encontrado|{count} documentos encontrados",
|
||||
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.SearchPage.existingResultsTitle": {
|
||||
"message": "Resultados de búsqueda para \"{query}\"",
|
||||
"description": "The search page title for non-empty query"
|
||||
},
|
||||
"theme.SearchPage.emptyResultsTitle": {
|
||||
"message": "Búsqueda en la documentación",
|
||||
"description": "The search page title for empty query"
|
||||
},
|
||||
"theme.SearchPage.inputPlaceholder": {
|
||||
"message": "Escribe tu búsqueda aquí",
|
||||
"description": "The placeholder for search page input"
|
||||
},
|
||||
"theme.SearchPage.inputLabel": {
|
||||
"message": "Buscar",
|
||||
"description": "The ARIA label for search page input"
|
||||
},
|
||||
"theme.SearchPage.algoliaLabel": {
|
||||
"message": "Búsqueda por Algolia",
|
||||
"description": "The ARIA label for Algolia mention"
|
||||
},
|
||||
"theme.SearchPage.noResultsText": {
|
||||
"message": "No se encontraron resultados",
|
||||
"description": "The paragraph for empty search result"
|
||||
},
|
||||
"theme.SearchPage.fetchingNewResults": {
|
||||
"message": "Obteniendo nuevos resultados...",
|
||||
"description": "The paragraph for fetching new search results"
|
||||
},
|
||||
"theme.SearchBar.label": {
|
||||
"message": "Buscar",
|
||||
"description": "The ARIA label and placeholder for search button"
|
||||
},
|
||||
"theme.SearchModal.searchBox.resetButtonTitle": {
|
||||
"message": "Clear the query",
|
||||
"description": "The label and ARIA label for search box reset button"
|
||||
},
|
||||
"theme.SearchModal.searchBox.cancelButtonText": {
|
||||
"message": "Cancel",
|
||||
"description": "The label and ARIA label for search box cancel button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.recentSearchesTitle": {
|
||||
"message": "Recent",
|
||||
"description": "The title for recent searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.noRecentSearchesText": {
|
||||
"message": "No recent searches",
|
||||
"description": "The text when no recent searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": {
|
||||
"message": "Save this search",
|
||||
"description": "The label for save recent search button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": {
|
||||
"message": "Remove this search from history",
|
||||
"description": "The label for remove recent search button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.favoriteSearchesTitle": {
|
||||
"message": "Favorite",
|
||||
"description": "The title for favorite searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": {
|
||||
"message": "Remove this search from favorites",
|
||||
"description": "The label for remove favorite search button"
|
||||
},
|
||||
"theme.SearchModal.errorScreen.titleText": {
|
||||
"message": "Unable to fetch results",
|
||||
"description": "The title for error screen of search modal"
|
||||
},
|
||||
"theme.SearchModal.errorScreen.helpText": {
|
||||
"message": "You might want to check your network connection.",
|
||||
"description": "The help text for error screen of search modal"
|
||||
},
|
||||
"theme.SearchModal.footer.selectText": {
|
||||
"message": "to select",
|
||||
"description": "The explanatory text of the action for the enter key"
|
||||
},
|
||||
"theme.SearchModal.footer.selectKeyAriaLabel": {
|
||||
"message": "Enter key",
|
||||
"description": "The ARIA label for the Enter key button that makes the selection"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateText": {
|
||||
"message": "to navigate",
|
||||
"description": "The explanatory text of the action for the Arrow up and Arrow down key"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateUpKeyAriaLabel": {
|
||||
"message": "Arrow up",
|
||||
"description": "The ARIA label for the Arrow up key button that makes the navigation"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateDownKeyAriaLabel": {
|
||||
"message": "Arrow down",
|
||||
"description": "The ARIA label for the Arrow down key button that makes the navigation"
|
||||
},
|
||||
"theme.SearchModal.footer.closeText": {
|
||||
"message": "to close",
|
||||
"description": "The explanatory text of the action for Escape key"
|
||||
},
|
||||
"theme.SearchModal.footer.closeKeyAriaLabel": {
|
||||
"message": "Escape key",
|
||||
"description": "The ARIA label for the Escape key button that close the modal"
|
||||
},
|
||||
"theme.SearchModal.footer.searchByText": {
|
||||
"message": "Search by",
|
||||
"description": "The text explain that the search is making by Algolia"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.noResultsText": {
|
||||
"message": "No results for",
|
||||
"description": "The text explains that there are no results for the following search"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.suggestedQueryText": {
|
||||
"message": "Try searching for",
|
||||
"description": "The text for the suggested query when no results are found for the following search"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.reportMissingResultsText": {
|
||||
"message": "Believe this query should return results?",
|
||||
"description": "The text for the question where the user thinks there are missing results"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": {
|
||||
"message": "Let us know.",
|
||||
"description": "The text for the link to report missing results"
|
||||
},
|
||||
"theme.SearchModal.placeholder": {
|
||||
"message": "Search docs",
|
||||
"description": "The placeholder of the input of the DocSearch pop-up modal"
|
||||
},
|
||||
"theme.common.skipToMainContent": {
|
||||
"message": "Saltar al contenido principal",
|
||||
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
|
||||
},
|
||||
"theme.tags.tagsPageTitle": {
|
||||
"message": "Etiquetas",
|
||||
"description": "The title of the tag list page"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
andreynering:
|
||||
name: Andrey Nering
|
||||
title: Maintainer of Task
|
||||
url: https://github.com/andreynering
|
||||
image_url: https://github.com/andreynering.png
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version.label": {
|
||||
"message": "Siguiente",
|
||||
"description": "The label for version current"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
---
|
||||
slug: /api/
|
||||
sidebar_position: 4
|
||||
toc_min_heading_level: 2
|
||||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
# API Reference
|
||||
|
||||
## CLI
|
||||
|
||||
Task command line tool has the following syntax:
|
||||
|
||||
```bash
|
||||
task [--flags] [tasks...] [-- CLI_ARGS...]
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
If `--` is given, all remaning arguments will be assigned to a special `CLI_ARGS` variable
|
||||
|
||||
:::
|
||||
|
||||
| Short | Flag | Type | Default | Description |
|
||||
| ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
||||
| `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. |
|
||||
| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. |
|
||||
| `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. |
|
||||
| `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. |
|
||||
| `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. |
|
||||
| `-g` | `--global` | `bool` | `false` | Runs global Taskfile, from `$HOME/Taskfile.{yml,yaml}`. |
|
||||
| `-h` | `--help` | `bool` | `false` | Shows Task usage. |
|
||||
| `-i` | `--init` | `bool` | `false` | Creates a new Taskfile.yml in the current folder. |
|
||||
| `-I` | `--interval` | `string` | `5s` | Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
|
||||
| `-l` | `--list` | `bool` | `false` | Lists tasks with description of current Taskfile. |
|
||||
| `-a` | `--list-all` | `bool` | `false` | Lists tasks with or without a description. |
|
||||
| | `--sort` | `string` | `default` | Changes the order of the tasks when listed.<br />`default` - Alphanumeric with root tasks first<br />`alphanumeric` - Alphanumeric<br />`none` - No sorting (As they appear in the Taskfile) |
|
||||
| | `--json` | `bool` | `false` | See [JSON Output](#json-output) |
|
||||
| `-o` | `--output` | `string` | Default set in the Taskfile or `intervealed` | Sets output style: [`interleaved`/`group`/`prefixed`]. |
|
||||
| | `--output-group-begin` | `string` | | Message template to print before a task's grouped output. |
|
||||
| | `--output-group-end` | `string` | | Message template to print after a task's grouped output. |
|
||||
| | `--output-group-error-only` | `bool` | `false` | Swallow command output on zero exit code. |
|
||||
| `-p` | `--parallel` | `bool` | `false` | Executes tasks provided on command line in parallel. |
|
||||
| `-s` | `--silent` | `bool` | `false` | Disables echoing. |
|
||||
| `-y` | `--yes` | `bool` | `false` | Assume "yes" as answer to all prompts. |
|
||||
| | `--status` | `bool` | `false` | Exits with non-zero exit code if any of the given tasks is not up-to-date. |
|
||||
| | `--summary` | `bool` | `false` | Show summary about a task. |
|
||||
| `-t` | `--taskfile` | `string` | `Taskfile.yml` or `Taskfile.yaml` | |
|
||||
| `-v` | `--verbose` | `bool` | `false` | Enables verbose mode. |
|
||||
| | `--version` | `bool` | `false` | Show Task version. |
|
||||
| `-w` | `--watch` | `bool` | `false` | Enables watch of the given task. |
|
||||
|
||||
## Exit Codes
|
||||
|
||||
Task will sometimes exit with specific exit codes. These codes are split into three groups with the following ranges:
|
||||
|
||||
- General errors (0-99)
|
||||
- Taskfile errors (100-199)
|
||||
- Task errors (200-299)
|
||||
|
||||
A full list of the exit codes and their descriptions can be found below:
|
||||
|
||||
| Code | Description |
|
||||
| ---- | ------------------------------------------------------------ |
|
||||
| 0 | Success |
|
||||
| 1 | An unknown error occurred |
|
||||
| 100 | No Taskfile was found |
|
||||
| 101 | A Taskfile already exists when trying to initialize one |
|
||||
| 102 | The Taskfile is invalid or cannot be parsed |
|
||||
| 200 | The specified task could not be found |
|
||||
| 201 | An error occurred while executing a command inside of a task |
|
||||
| 202 | The user tried to invoke a task that is internal |
|
||||
| 203 | There a multiple tasks with the same name or alias |
|
||||
| 204 | A task was called too many times |
|
||||
| 205 | A task was cancelled by the user |
|
||||
|
||||
These codes can also be found in the repository in [`errors/errors.go`](https://github.com/go-task/task/blob/main/errors/errors.go).
|
||||
|
||||
:::info
|
||||
|
||||
When Task is run with the `-x`/`--exit-code` flag, the exit code of any failed commands will be passed through to the user instead.
|
||||
|
||||
:::
|
||||
|
||||
## JSON Output
|
||||
|
||||
When using the `--json` flag in combination with either the `--list` or `--list-all` flags, the output will be a JSON object with the following structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"name": "",
|
||||
"desc": "",
|
||||
"summary": "",
|
||||
"up_to_date": false,
|
||||
"location": {
|
||||
"line": 54,
|
||||
"column": 3,
|
||||
"taskfile": "/path/to/Taskfile.yml"
|
||||
}
|
||||
}
|
||||
// ...
|
||||
],
|
||||
"location": "/path/to/Taskfile.yml"
|
||||
}
|
||||
```
|
||||
|
||||
## Special Variables
|
||||
|
||||
There are some special variables that is available on the templating system:
|
||||
|
||||
| Var | Description |
|
||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `CLI_ARGS` | Contain all extra arguments passed after `--` when calling Task through the CLI. |
|
||||
| `TASK` | The name of the current task. |
|
||||
| `ROOT_DIR` | The absolute path of the root Taskfile. |
|
||||
| `TASKFILE_DIR` | The absolute path of the included Taskfile. |
|
||||
| `USER_WORKING_DIR` | The absolute path of the directory `task` was called from. |
|
||||
| `CHECKSUM` | The checksum of the files listed in `sources`. Only available within the `status` prop and if method is set to `checksum`. |
|
||||
| `TIMESTAMP` | The date object of the greatest timestamp of the files listes in `sources`. Only available within the `status` prop and if method is set to `timestamp`. |
|
||||
| `TASK_VERSION` | The current version of task. |
|
||||
|
||||
## ENV
|
||||
|
||||
Some environment variables can be overriden to adjust Task behavior.
|
||||
|
||||
| ENV | Default | Description |
|
||||
| -------------------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| `TASK_TEMP_DIR` | `.task` | Location of the temp dir. Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. |
|
||||
| `TASK_COLOR_RESET` | `0` | Color used for white. |
|
||||
| `TASK_COLOR_BLUE` | `34` | Color used for blue. |
|
||||
| `TASK_COLOR_GREEN` | `32` | Color used for green. |
|
||||
| `TASK_COLOR_CYAN` | `36` | Color used for cyan. |
|
||||
| `TASK_COLOR_YELLOW` | `33` | Color used for yellow. |
|
||||
| `TASK_COLOR_MAGENTA` | `35` | Color used for magenta. |
|
||||
| `TASK_COLOR_RED` | `31` | Color used for red. |
|
||||
| `FORCE_COLOR` | | Force color output usage. |
|
||||
|
||||
## Taskfile Schema
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| ---------- | ---------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `version` | `string` | | Version of the Taskfile. The current version is `3`. |
|
||||
| `output` | `string` | `interleaved` | Output mode. Available options: `interleaved`, `group` and `prefixed`. |
|
||||
| `method` | `string` | `checksum` | Default method in this Taskfile. Can be overriden in a task by task basis. Available options: `checksum`, `timestamp` and `none`. |
|
||||
| `includes` | [`map[string]Include`](#include) | | Additional Taskfiles to be included. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | A set of global variables. |
|
||||
| `env` | [`map[string]Variable`](#variable) | | A set of global environment variables. |
|
||||
| `tasks` | [`map[string]Task`](#task) | | A set of task definitions. |
|
||||
| `silent` | `bool` | `false` | Default 'silent' options for this Taskfile. If `false`, can be overidden with `true` in a task by task basis. |
|
||||
| `dotenv` | `[]string` | | A list of `.env` file paths to be parsed. |
|
||||
| `run` | `string` | `always` | Default 'run' option for this Taskfile. Available options: `always`, `once` and `when_changed`. |
|
||||
| `interval` | `string` | `5s` | Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
### Include
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| ---------- | --------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `taskfile` | `string` | | The path for the Taskfile or directory to be included. If a directory, Task will look for files named `Taskfile.yml` or `Taskfile.yaml` inside that directory. If a relative path, resolved relative to the directory containing the including Taskfile. |
|
||||
| `dir` | `string` | The parent Taskfile directory | The working directory of the included tasks when run. |
|
||||
| `optional` | `bool` | `false` | If `true`, no errors will be thrown if the specified file does not exist. |
|
||||
| `internal` | `bool` | `false` | Stops any task in the included Taskfile from being callable on the command line. These commands will also be omitted from the output when used with `--list`. |
|
||||
| `aliases` | `[]string` | | Alternative names for the namespace of the included Taskfile. |
|
||||
| `vars` | `map[string]Variable` | | A set of variables to apply to the included Taskfile. |
|
||||
|
||||
:::info
|
||||
|
||||
Informing only a string like below is equivalent to setting that value to the `taskfile` attribute.
|
||||
|
||||
```yaml
|
||||
includes:
|
||||
foo: ./path
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
### Variable
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | -------- | ------- | ------------------------------------------------------------------------ |
|
||||
| _itself_ | `string` | | A static value that will be set to the variable. |
|
||||
| `sh` | `string` | | A shell command. The output (`STDOUT`) will be assigned to the variable. |
|
||||
|
||||
:::info
|
||||
|
||||
Static and dynamic variables have different syntaxes, like below:
|
||||
|
||||
```yaml
|
||||
vars:
|
||||
STATIC: static
|
||||
DYNAMIC:
|
||||
sh: echo "dynamic"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
### Task
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------------- | ---------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cmds` | [`[]Command`](#command) | | A list of shell commands to be executed. |
|
||||
| `deps` | [`[]Dependency`](#dependency) | | A list of dependencies of this task. Tasks defined here will run in parallel before this task. |
|
||||
| `label` | `string` | | Overrides the name of the task in the output when a task is run. Supports variables. |
|
||||
| `desc` | `string` | | A short description of the task. This is displayed when calling `task --list`. |
|
||||
| `prompt` | `string` | | A prompt that will be presented before a task is run. Declining will cancel running the current and any subsequent tasks. |
|
||||
| `summary` | `string` | | A longer description of the task. This is displayed when calling `task --summary [task]`. |
|
||||
| `aliases` | `[]string` | | A list of alternative names by which the task can be called. |
|
||||
| `sources` | `[]string` | | A list of sources to check before running this task. Relevant for `checksum` and `timestamp` methods. Can be file paths or star globs. |
|
||||
| `generates` | `[]string` | | A list of files meant to be generated by this task. Relevant for `timestamp` method. Can be file paths or star globs. |
|
||||
| `status` | `[]string` | | A list of commands to check if this task should run. The task is skipped otherwise. This overrides `method`, `sources` and `generates`. |
|
||||
| `preconditions` | [`[]Precondition`](#precondition) | | A list of commands to check if this task should run. If a condition is not met, the task will error. |
|
||||
| `dir` | `string` | | The directory in which this task should run. Defaults to the current working directory. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | A set of variables that can be used in the task. |
|
||||
| `env` | [`map[string]Variable`](#variable) | | A set of environment variables that will be made available to shell commands. |
|
||||
| `dotenv` | `[]string` | | A list of `.env` file paths to be parsed. |
|
||||
| `silent` | `bool` | `false` | Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`. When combined with the `--list` flag, task descriptions will be hidden. |
|
||||
| `interactive` | `bool` | `false` | Tells task that the command is interactive. |
|
||||
| `internal` | `bool` | `false` | Stops a task from being callable on the command line. It will also be omitted from the output when used with `--list`. |
|
||||
| `method` | `string` | `checksum` | Defines which method is used to check the task is up-to-date. `timestamp` will compare the timestamp of the sources and generates files. `checksum` will check the checksum (You probably want to ignore the .task folder in your .gitignore file). `none` skips any validation and always run the task. |
|
||||
| `prefix` | `string` | | Defines a string to prefix the output of tasks running in parallel. Only used when the output mode is `prefixed`. |
|
||||
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing commands. |
|
||||
| `run` | `string` | The one declared globally in the Taskfile or `always` | Specifies whether the task should run again or not if called more than once. Available options: `always`, `once` and `when_changed`. |
|
||||
| `platforms` | `[]string` | All platforms | Specifies which platforms the task should be run on. [Valid GOOS and GOARCH values allowed](https://github.com/golang/go/blob/main/src/go/build/syslist.go). Task will be skipped otherwise. |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
:::info
|
||||
|
||||
These alternative syntaxes are available. They will set the given values to `cmds` and everything else will be set to their default values:
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo: echo "foo"
|
||||
|
||||
foobar:
|
||||
- echo "foo"
|
||||
- echo "bar"
|
||||
|
||||
baz:
|
||||
cmd: echo "baz"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
#### Command
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| -------------- | ---------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cmd` | `string` | | The shell command to be executed. |
|
||||
| `silent` | `bool` | `false` | Skips some output for this command. Note that STDOUT and STDERR of the commands will still be redirected. |
|
||||
| `task` | `string` | | Set this to trigger execution of another task instead of running a command. This cannot be set together with `cmd`. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to the referenced task. Only relevant when setting `task` instead of `cmd`. |
|
||||
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing the command. |
|
||||
| `defer` | `string` | | Alternative to `cmd`, but schedules the command to be executed at the end of this task instead of immediately. This cannot be used together with `cmd`. |
|
||||
| `platforms` | `[]string` | All platforms | Specifies which platforms the command should be run on. [Valid GOOS and GOARCH values allowed](https://github.com/golang/go/blob/main/src/go/build/syslist.go). Command will be skipped otherwise. |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
:::info
|
||||
|
||||
If given as a a string, the value will be assigned to `cmd`:
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo "foo"
|
||||
- echo "bar"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
#### Dependency
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | ---------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `task` | `string` | | The task to be execute as a dependency. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to this task. |
|
||||
| `silent` | `bool` | `false` | Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`. |
|
||||
|
||||
:::tip
|
||||
|
||||
If you don't want to set additional variables, it's enough to declare the dependency as a list of strings (they will be assigned to `task`):
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo:
|
||||
deps: [foo, bar]
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
#### Precondition
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `sh` | `string` | | Command to be executed. If a non-zero exit code is returned, the task errors without executing its commands. |
|
||||
| `msg` | `string` | | Optional message to print if the precondition isn't met. |
|
||||
|
||||
:::tip
|
||||
|
||||
If you don't want to set a different message, you can declare a precondition like this and the value will be assigned to `sh`:
|
||||
|
||||
```yaml
|
||||
tasks:
|
||||
foo:
|
||||
precondition: test -f Taskfile.yml
|
||||
```
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,473 @@
|
||||
---
|
||||
slug: /changelog/
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Changelog
|
||||
|
||||
## v3.25.0 - 2023-05-22
|
||||
|
||||
- Support `silent:` when calling another tasks ([#680](https://github.com/go-task/task/issues/680), [#1142](https://github.com/go-task/task/issues/1142) by [@danquah](https://github.com/danquah)).
|
||||
- Improve PowerShell completion script ([#1168](https://github.com/go-task/task/issues/1168) by [@trim21](https://github.com/trim21)).
|
||||
- Add more languages to the website menu and show translation progress percentage ([#1173](https://github.com/go-task/task/issues/1173) by [@misitebao](https://github.com/misitebao)).
|
||||
- Starting on this release, official binaries for FreeBSD will be available to download ([#1068](https://github.com/go-task/task/issues/1068) by [@andreynering](https://github.com/andreynering)).
|
||||
- Fix some errors being unintendedly supressed ([#1134](https://github.com/go-task/task/issues/1134) by [@clintmod](https://github.com/clintmod)).
|
||||
- Fix a nil pointer error when `version` is omitted from a Taskfile ([#1148](https://github.com/go-task/task/issues/1148), [#1149](https://github.com/go-task/task/issues/1149) by [@pd93](https://github.com/pd93)).
|
||||
- Fix duplicate error message when a task does not exists ([#1141](https://github.com/go-task/task/issues/1141), [#1144](https://github.com/go-task/task/issues/1144) by [@pd93](https://github.com/pd93)).
|
||||
|
||||
## v3.24.0 - 2023-04-15
|
||||
|
||||
- Fix Fish shell completion for tasks with aliases ([#1113](https://github.com/go-task/task/issues/1113) by [@patricksjackson](https://github.com/patricksjackson)).
|
||||
- The default branch was renamed from `master` to `main` ([#1049](https://github.com/go-task/task/issues/1049), [#1048](https://github.com/go-task/task/issues/1048) by [@pd93](https://github.com/pd93)).
|
||||
- Fix bug where "up-to-date" logs were not being omitted for silent tasks ([#546](https://github.com/go-task/task/issues/546), [#1107](https://github.com/go-task/task/issues/1107) by [@danquah](https://github.com/danquah)).
|
||||
- Add `.hg` (Mercurial) to the list of ignored directories when using `--watch` ([#1098](https://github.com/go-task/task/issues/1098) by [@misery](https://github.com/misery)).
|
||||
- More improvements to the release tool ([#1096](https://github.com/go-task/task/issues/1096) by [@pd93](https://github.com/pd93)).
|
||||
- Enforce [gofumpt](https://github.com/mvdan/gofumpt) linter ([#1099](https://github.com/go-task/task/issues/1099) by [@pd93](https://github.com/pd93))
|
||||
- Add `--sort` flag for use with `--list` and `--list-all` ([#946](https://github.com/go-task/task/issues/946), [#1105](https://github.com/go-task/task/issues/1105) by [@pd93](https://github.com/pd93)).
|
||||
- Task now has [custom exit codes](https://taskfile.dev/api/#exit-codes) depending on the error ([#1114](https://github.com/go-task/task/issues/1114) by [@pd93](https://github.com/pd93)).
|
||||
|
||||
## v3.23.0 - 2023-03-26
|
||||
|
||||
Task now has an [official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task) contributed by [@pd93](https://github.com/pd93)! :tada: The extension is maintained in a [new repository](https://github.com/go-task/vscode-task) 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](https://github.com/go-task/vscode-task/discussions), [issue](https://github.com/go-task/vscode-task/issues) or on our [Discord](https://discord.gg/6TY36E39UK)!
|
||||
|
||||
> **NOTE:** The extension _requires_ v3.23.0 to be installed in order to work.
|
||||
|
||||
- The website was integrated with [Crowdin](https://crowdin.com/project/taskfile) to allow the community to contribute with translations! [Chinese](https://taskfile.dev/zh-Hans/) is the first language available ([#1057](https://github.com/go-task/task/issues/1057), [#1058](https://github.com/go-task/task/issues/1058) by [@misitebao](https://github.com/misitebao)).
|
||||
- Added task location data to the `--json` flag output ([#1056](https://github.com/go-task/task/issues/1056) by [@pd93](https://github.com/pd93))
|
||||
- Change the name of the file generated by `task --init` from `Taskfile.yaml` to `Taskfile.yml` ([#1062](https://github.com/go-task/task/issues/1062) by [@misitebao](https://github.com/misitebao)).
|
||||
- Added new `splitArgs` template function (`{{splitArgs "foo bar 'foo bar baz'"}}`) to ensure string is split as arguments ([#1040](https://github.com/go-task/task/issues/1040), [#1059](https://github.com/go-task/task/issues/1059) by [@dhanusaputra](https://github.com/dhanusaputra)).
|
||||
- Fix the value of `{{.CHECKSUM}}` variable in status ([#1076](https://github.com/go-task/task/issues/1076), [#1080](https://github.com/go-task/task/issues/1080) by [@pd93](https://github.com/pd93)).
|
||||
- Fixed deep copy implementation ([#1072](https://github.com/go-task/task/issues/1072) by [@pd93](https://github.com/pd93))
|
||||
- Created a tool to assist with releases ([#1086](https://github.com/go-task/task/issues/1086) by [@pd93](https://github.com/pd93)).
|
||||
|
||||
## v3.22.0 - 2023-03-10
|
||||
|
||||
- Add a brand new `--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](https://taskfile.dev/usage/#running-a-global-taskfile), [#1029](https://github.com/go-task/task/issues/1029) by [@andreynering](https://github.com/andreynering)).
|
||||
- Add ability to set `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](https://github.com/go-task/task/issues/664), [#1022](https://github.com/go-task/task/issues/1022) by [@jaedle](https://github.com/jaedle)).
|
||||
- Fixed bug where `.task/checksum` file was sometimes not being created when task also declares a `status:` ([#840](https://github.com/go-task/task/issues/840), [#1035](https://github.com/go-task/task/issues/1035) by [@harelwa](https://github.com/harelwa), [#1037](https://github.com/go-task/task/issues/1037) by [@pd93](https://github.com/pd93)).
|
||||
- Refactored and decoupled fingerprinting from the main Task executor ([#1039](https://github.com/go-task/task/issues/1039) by [@pd93](https://github.com/pd93)).
|
||||
- Fixed deadlock issue when using `run: once` ([#715](https://github.com/go-task/task/issues/715), [#1025](https://github.com/go-task/task/issues/1025) by [@theunrepentantgeek](https://github.com/theunrepentantgeek)).
|
||||
|
||||
## v3.21.0 - 2023-02-22
|
||||
|
||||
- Added new `TASK_VERSION` special variable ([#990](https://github.com/go-task/task/issues/990), [#1014](https://github.com/go-task/task/issues/1014) by [@ja1code](https://github.com/ja1code)).
|
||||
- Fixed a bug where tasks were sometimes incorrectly marked as internal ([#1007](https://github.com/go-task/task/issues/1007) by [@pd93](https://github.com/pd93)).
|
||||
- Update to Go 1.20 (bump minimum version to 1.19) ([#1010](https://github.com/go-task/task/issues/1010) by [@pd93](https://github.com/pd93))
|
||||
- Added environment variable `FORCE_COLOR` support to force color output. Usefull for environments without TTY ([#1003](https://github.com/go-task/task/issues/1003) by [@automation](https://github.com/automation)-stack)
|
||||
|
||||
## v3.20.0 - 2023-01-14
|
||||
|
||||
- Improve behavior and performance of status checking when using the `timestamp` mode ([#976](https://github.com/go-task/task/issues/976), [#977](https://github.com/go-task/task/issues/977) by [@aminya](https://github.com/aminya)).
|
||||
- Performance optimizations were made for large Taskfiles ([#982](https://github.com/go-task/task/issues/982) by [@pd93](https://github.com/pd93)).
|
||||
- Add ability to configure options for the [`set`](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html) and [`shopt`](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html) builtins ([#908](https://github.com/go-task/task/issues/908), [#929](https://github.com/go-task/task/issues/929) by [@pd93](https://github.com/pd93), [Documentation](http://taskfile.dev/usage/#set-and-shopt)).
|
||||
- Add new `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](https://github.com/go-task/task/issues/978), [#980](https://github.com/go-task/task/issues/980) by [@leaanthony](https://github.com/leaanthony)).
|
||||
|
||||
## v3.19.1 - 2022-12-31
|
||||
|
||||
- Small bug fix: closing `Taskfile.yml` once we're done reading it ([#963](https://github.com/go-task/task/issues/963), [#964](https://github.com/go-task/task/issues/964) by [@HeCorr](https://github.com/HeCorr)).
|
||||
- Fixes a bug in v2 that caused a panic when using a `Taskfile_{{OS}}.yml` file ([#961](https://github.com/go-task/task/issues/961), [#971](https://github.com/go-task/task/issues/971) by [@pd93](https://github.com/pd93)).
|
||||
- Fixed a bug where watch intervals set in the Taskfile were not being respected ([#969](https://github.com/go-task/task/issues/969), [#970](https://github.com/go-task/task/issues/970) by [@pd93](https://github.com/pd93))
|
||||
- Add `--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](https://github.com/go-task/task/issues/936) by [@davidalpert](https://github.com/davidalpert), [#764](https://github.com/go-task/task/issues/764)).
|
||||
|
||||
## v3.19.0 - 2022-12-05
|
||||
|
||||
- Installation via npm now supports [pnpm](https://pnpm.io/) as well ([go-task/go-npm\[#2\](https://github.com/go-task/task/issues/2)](https://github.com/go-task/go-npm/issues/2), [go-task/go-npm\[#3\](https://github.com/go-task/task/issues/3)](https://github.com/go-task/go-npm/pull/3)).
|
||||
- It's now possible to run Taskfiles from subdirectories! A new `USER_WORKING_DIR` special variable was added to add even more flexibility for monorepos ([#289](https://github.com/go-task/task/issues/289), [#920](https://github.com/go-task/task/issues/920)).
|
||||
- Add task-level `dotenv` support ([#389](https://github.com/go-task/task/issues/389), [#904](https://github.com/go-task/task/issues/904)).
|
||||
- It's now possible to use global level variables on `includes` ([#942](https://github.com/go-task/task/issues/942), [#943](https://github.com/go-task/task/issues/943)).
|
||||
- The website got a brand new [translation to Chinese](https://task-zh.readthedocs.io/zh_CN/latest/) by [\[@DeronW\](https://github.com/DeronW)](https://github.com/DeronW). Thanks!
|
||||
|
||||
## v3.18.0 - 2022-11-12
|
||||
|
||||
- Show aliases on `task --list --silent` (`task --ls`). This means that aliases will be completed by the completion scripts ([#919](https://github.com/go-task/task/issues/919)).
|
||||
- Tasks in the root Taskfile will now be displayed first in `--list`/`--list-all` output ([#806](https://github.com/go-task/task/issues/806), [#890](https://github.com/go-task/task/issues/890)).
|
||||
- It's now possible to call a `default` task in an included Taskfile by using just the namespace. For example: `docs:default` is now automatically aliased to `docs` ([#661](https://github.com/go-task/task/issues/661), [#815](https://github.com/go-task/task/issues/815)).
|
||||
|
||||
## v3.17.0 - 2022-10-14
|
||||
|
||||
- Add a "Did you mean ...?" suggestion when a task does not exits another one with a similar name is found ([#867](https://github.com/go-task/task/issues/867), [#880](https://github.com/go-task/task/issues/880)).
|
||||
- Now YAML parse errors will print which Taskfile failed to parse ([#885](https://github.com/go-task/task/issues/885), [#887](https://github.com/go-task/task/issues/887)).
|
||||
- Add ability to set `aliases` for tasks and namespaces ([#268](https://github.com/go-task/task/issues/268), [#340](https://github.com/go-task/task/issues/340), [#879](https://github.com/go-task/task/issues/879)).
|
||||
- Improvements to Fish shell completion ([#897](https://github.com/go-task/task/issues/897)).
|
||||
- Added ability to set a different watch interval by setting `interval: '500ms'` or using the `--interval=500ms` flag ([#813](https://github.com/go-task/task/issues/813), [#865](https://github.com/go-task/task/issues/865)).
|
||||
- Add colored output to `--list`, `--list-all` and `--summary` flags ([#845](https://github.com/go-task/task/issues/845), [#874](https://github.com/go-task/task/issues/874)).
|
||||
- Fix unexpected behavior where `label:` was being shown instead of the task name on `--list` ([#603](https://github.com/go-task/task/issues/603), [#877](https://github.com/go-task/task/issues/877)).
|
||||
|
||||
## v3.16.0 - 2022-09-29
|
||||
|
||||
- Add `npm` as new installation method: `npm i -g [@go](https://github.com/go)-task/cli` ([#870](https://github.com/go-task/task/issues/870), [#871](https://github.com/go-task/task/issues/871), [npm package](https://www.npmjs.com/package/[@go](https://github.com/go)-task/cli)).
|
||||
- Add support to marking tasks and includes as internal, which will hide them from `--list` and `--list-all` ([#818](https://github.com/go-task/task/issues/818)).
|
||||
|
||||
## v3.15.2 - 2022-09-08
|
||||
|
||||
- Fix error when using variable in `env:` introduced in the previous release ([#858](https://github.com/go-task/task/issues/858), [#866](https://github.com/go-task/task/issues/866)).
|
||||
- Fix handling of `CLI_ARGS` (`--`) in Bash completion ([#863](https://github.com/go-task/task/issues/863)).
|
||||
- On zsh completion, add ability to replace `--list-all` with `--list` as already possible on the Bash completion ([#861](https://github.com/go-task/task/issues/861)).
|
||||
|
||||
## v3.15.0 - 2022-09-03
|
||||
|
||||
- Add new special variables `ROOT_DIR` and `TASKFILE_DIR`. This was a highly requested feature ([#215](https://github.com/go-task/task/issues/215), [#857](https://github.com/go-task/task/issues/857), [Documentation](https://taskfile.dev/api/#special-variables)).
|
||||
- Follow symlinks on `sources` ([#826](https://github.com/go-task/task/issues/826), [#831](https://github.com/go-task/task/issues/831)).
|
||||
- Improvements and fixes to Bash completion ([#835](https://github.com/go-task/task/issues/835), [#844](https://github.com/go-task/task/issues/844)).
|
||||
|
||||
## v3.14.1 - 2022-08-03
|
||||
|
||||
- Always resolve relative include paths relative to the including Taskfile ([#822](https://github.com/go-task/task/issues/822), [#823](https://github.com/go-task/task/issues/823)).
|
||||
- Fix ZSH and PowerShell completions to consider all tasks instead of just the public ones (those with descriptions) ([#803](https://github.com/go-task/task/issues/803)).
|
||||
|
||||
## v3.14.0 - 2022-07-08
|
||||
|
||||
- Add ability to override the `.task` directory location with the `TASK_TEMP_DIR` environment variable.
|
||||
- Allow to override Task colors using environment variables: `TASK_COLOR_RESET`, `TASK_COLOR_BLUE`, `TASK_COLOR_GREEN`, `TASK_COLOR_CYAN`, `TASK_COLOR_YELLOW`, `TASK_COLOR_MAGENTA` and `TASK_COLOR_RED` ([#568](https://github.com/go-task/task/issues/568), [#792](https://github.com/go-task/task/issues/792)).
|
||||
- Fixed bug when using the `output: group` mode where STDOUT and STDERR were being print in separated blocks instead of in the right order ([#779](https://github.com/go-task/task/issues/779)).
|
||||
- Starting on this release, ARM architecture binaries are been released to Snap as well ([#795](https://github.com/go-task/task/issues/795)).
|
||||
- i386 binaries won't be available anymore on Snap because Ubuntu removed the support for this architecture.
|
||||
- Upgrade mvdan.cc/sh, which fixes a bug with associative arrays ([#785](https://github.com/go-task/task/issues/785), [mvdan/sh\[#884\](https://github.com/go-task/task/issues/884)](https://github.com/mvdan/sh/issues/884), [mvdan/sh\[#893\](https://github.com/go-task/task/issues/893)](https://github.com/mvdan/sh/pull/893)).
|
||||
|
||||
## v3.13.0 - 2022-06-13
|
||||
|
||||
- Added `-n` as an alias to `--dry` ([#776](https://github.com/go-task/task/issues/776), [#777](https://github.com/go-task/task/issues/777)).
|
||||
- Fix behavior of interrupt (SIGINT, SIGTERM) signals. Task will now give time for the processes running to do cleanup work ([#458](https://github.com/go-task/task/issues/458), [#479](https://github.com/go-task/task/issues/479), [#728](https://github.com/go-task/task/issues/728), [#769](https://github.com/go-task/task/issues/769)).
|
||||
- Add new `--exit-code` (`-x`) flag that will pass-through the exit form the command being ran ([#755](https://github.com/go-task/task/issues/755)).
|
||||
|
||||
## v3.12.1 - 2022-05-10
|
||||
|
||||
- Fixed bug where, on Windows, variables were ending with `\r` because we were only removing the final `\n` but not `\r\n` ([#717](https://github.com/go-task/task/issues/717)).
|
||||
|
||||
## v3.12.0 - 2022-03-31
|
||||
|
||||
- The `--list` and `--list-all` flags can now be combined with the `--silent` flag to print the task names only, without their description ([#691](https://github.com/go-task/task/issues/691)).
|
||||
- Added support for multi-level inclusion of Taskfiles. This means that included Taskfiles can also include other Taskfiles. Before this was limited to one level ([#390](https://github.com/go-task/task/issues/390), [#623](https://github.com/go-task/task/issues/623), [#656](https://github.com/go-task/task/issues/656)).
|
||||
- Add ability to specify vars when including a Taskfile. [Check out the documentation](https://taskfile.dev/#/usage?id=vars-of-included-taskfiles) for more information ([#677](https://github.com/go-task/task/issues/677)).
|
||||
|
||||
## v3.11.0 - 2022-02-19
|
||||
|
||||
- Task now supports printing begin and end messages when using the `group` output mode, useful for grouping tasks in CI systems. [Check out the documentation](http://taskfile.dev/#/usage?id=output-syntax) for more information ([#647](https://github.com/go-task/task/issues/647), [#651](https://github.com/go-task/task/issues/651)).
|
||||
- Add `Taskfile.dist.yml` and `Taskfile.dist.yaml` to the supported file name list. [Check out the documentation](https://taskfile.dev/#/usage?id=supported-file-names) for more information ([#498](https://github.com/go-task/task/issues/498), [#666](https://github.com/go-task/task/issues/666)).
|
||||
|
||||
## v3.10.0 - 2022-01-04
|
||||
|
||||
- A new `--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](https://github.com/go-task/task/issues/383), [#401](https://github.com/go-task/task/issues/401)).
|
||||
- It's now possible to schedule cleanup commands to run once a task finishes with the `defer:` keyword ([Documentation](https://taskfile.dev/#/usage?id=doing-task-cleanup-with-defer), [#475](https://github.com/go-task/task/issues/475), [#626](https://github.com/go-task/task/issues/626)).
|
||||
- Remove long deprecated and undocumented `$` variable prefix and `^` command prefix ([#642](https://github.com/go-task/task/issues/642), [#644](https://github.com/go-task/task/issues/644), [#645](https://github.com/go-task/task/issues/645)).
|
||||
- Add support for `.yaml` extension (as an alternative to `.yml`). This was requested multiple times throughout the years. Enjoy! ([#183](https://github.com/go-task/task/issues/183), [#184](https://github.com/go-task/task/issues/184), [#369](https://github.com/go-task/task/issues/369), [#584](https://github.com/go-task/task/issues/584), [#621](https://github.com/go-task/task/issues/621)).
|
||||
- Fixed error when computing a variable when the task directory do not exist yet ([#481](https://github.com/go-task/task/issues/481), [#579](https://github.com/go-task/task/issues/579)).
|
||||
|
||||
## v3.9.2 - 2021-12-02
|
||||
|
||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains a fix a for a important regression on Windows ([#619](https://github.com/go-task/task/issues/619), [mvdan/sh\[#768\](https://github.com/go-task/task/issues/768)](https://github.com/mvdan/sh/issues/768), [mvdan/sh\[#769\](https://github.com/go-task/task/issues/769)](https://github.com/mvdan/sh/pull/769)).
|
||||
|
||||
## v3.9.1 - 2021-11-28
|
||||
|
||||
- Add logging in verbose mode for when a task starts and finishes ([#533](https://github.com/go-task/task/issues/533), [#588](https://github.com/go-task/task/issues/588)).
|
||||
- Fix an issue with preconditions and context errors ([#597](https://github.com/go-task/task/issues/597), [#598](https://github.com/go-task/task/issues/598)).
|
||||
- Quote each `{{.CLI_ARGS}}` argument to prevent one with spaces to become many ([#613](https://github.com/go-task/task/issues/613)).
|
||||
- Fix nil pointer when `cmd:` was left empty ([#612](https://github.com/go-task/task/issues/612), [#614](https://github.com/go-task/task/issues/614)).
|
||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains two relevant fixes:
|
||||
- Fix quote of empty strings in `shellQuote` ([#609](https://github.com/go-task/task/issues/609), [mvdan/sh\[#763\](https://github.com/go-task/task/issues/763)](https://github.com/mvdan/sh/issues/763)).
|
||||
- Fix issue of wrong environment variable being picked when there's another very similar one ([#586](https://github.com/go-task/task/issues/586), [mvdan/sh\[#745\](https://github.com/go-task/task/issues/745)](https://github.com/mvdan/sh/pull/745)).
|
||||
- Install shell completions automatically when installing via Homebrew ([#264](https://github.com/go-task/task/issues/264), [#592](https://github.com/go-task/task/issues/592), [go-task/homebrew-tap\[#2\](https://github.com/go-task/task/issues/2)](https://github.com/go-task/homebrew-tap/pull/2)).
|
||||
|
||||
## v3.9.0 - 2021-10-02
|
||||
|
||||
- A new `shellQuote` function was added to the template system (`{{shellQuote "a string"}}`) to ensure a string is safe for use in shell ([mvdan/sh\[#727\](https://github.com/go-task/task/issues/727)](https://github.com/mvdan/sh/pull/727), [mvdan/sh\[#737\](https://github.com/go-task/task/issues/737)](https://github.com/mvdan/sh/pull/737), [Documentation](https://pkg.go.dev/mvdan.cc/sh/v3[@v3](https://github.com/v3).4.0/syntax#Quote))
|
||||
- In this version [mvdan.cc/sh](https://github.com/mvdan/sh) was upgraded with some small fixes and features
|
||||
- The `read -p` flag is now supported ([#314](https://github.com/go-task/task/issues/314), [mvdan/sh\[#551\](https://github.com/go-task/task/issues/551)](https://github.com/mvdan/sh/issues/551), [mvdan/sh\[#772\](https://github.com/go-task/task/issues/772)](https://github.com/mvdan/sh/pull/722))
|
||||
- The `pwd -P` and `pwd -L` flags are now supported ([#553](https://github.com/go-task/task/issues/553), [mvdan/sh\[#724\](https://github.com/go-task/task/issues/724)](https://github.com/mvdan/sh/issues/724), [mvdan/sh\[#728\](https://github.com/go-task/task/issues/728)](https://github.com/mvdan/sh/pull/728))
|
||||
- The `$GID` environment variable is now correctly being set ([#561](https://github.com/go-task/task/issues/561), [mvdan/sh\[#723\](https://github.com/go-task/task/issues/723)](https://github.com/mvdan/sh/pull/723))
|
||||
|
||||
## v3.8.0 - 2021-09-26
|
||||
|
||||
- Add `interactive: true` setting to improve support for interactive CLI apps ([#217](https://github.com/go-task/task/issues/217), [#563](https://github.com/go-task/task/issues/563)).
|
||||
- Fix some `nil` errors ([#534](https://github.com/go-task/task/issues/534), [#573](https://github.com/go-task/task/issues/573)).
|
||||
- Add ability to declare an included Taskfile as optional ([#519](https://github.com/go-task/task/issues/519), [#552](https://github.com/go-task/task/issues/552)).
|
||||
- Add support for including Taskfiles in the home directory by using `~` ([#539](https://github.com/go-task/task/issues/539), [#557](https://github.com/go-task/task/issues/557)).
|
||||
|
||||
## v3.7.3 - 2021-09-04
|
||||
|
||||
- Add official support to Apple M1 ([#564](https://github.com/go-task/task/issues/564), [#567](https://github.com/go-task/task/issues/567)).
|
||||
- Our [official Homebrew tap](https://github.com/go-task/homebrew-tap) will support more platforms, including Apple M1
|
||||
|
||||
## v3.7.0 - 2021-07-31
|
||||
|
||||
- Add `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](https://github.com/go-task/task/issues/53), [#359](https://github.com/go-task/task/issues/359)).
|
||||
|
||||
## v3.6.0 - 2021-07-10
|
||||
|
||||
- Allow using both `sources:` and `status:` in the same task ([#411](https://github.com/go-task/task/issues/411), [#427](https://github.com/go-task/task/issues/427), [#477](https://github.com/go-task/task/issues/477)).
|
||||
- Small optimization and bug fix: don't compute variables if not needed for `dotenv:` ([#517](https://github.com/go-task/task/issues/517)).
|
||||
|
||||
## v3.5.0 - 2021-07-04
|
||||
|
||||
- Add support for interpolation in `dotenv:` ([#433](https://github.com/go-task/task/issues/433), [#434](https://github.com/go-task/task/issues/434), [#453](https://github.com/go-task/task/issues/453)).
|
||||
|
||||
## v3.4.3 - 2021-05-30
|
||||
|
||||
- Add support for the `NO_COLOR` environment variable. ([#459](https://github.com/go-task/task/issues/459), [fatih/color\[#137\](https://github.com/go-task/task/issues/137)](https://github.com/fatih/color/pull/137)).
|
||||
- Fix bug where sources were not considering the right directory in `--watch` mode ([#484](https://github.com/go-task/task/issues/484), [#485](https://github.com/go-task/task/issues/485)).
|
||||
|
||||
## v3.4.2 - 2021-04-23
|
||||
|
||||
- On watch, report which file failed to read ([#472](https://github.com/go-task/task/issues/472)).
|
||||
- Do not try to catch SIGKILL signal, which are not actually possible ([#476](https://github.com/go-task/task/issues/476)).
|
||||
- Improve version reporting when building Task from source using Go Modules ([#462](https://github.com/go-task/task/issues/462), [#473](https://github.com/go-task/task/issues/473)).
|
||||
|
||||
## v3.4.1 - 2021-04-17
|
||||
|
||||
- Improve error reporting when parsing YAML: in some situations where you would just see an generic error, you'll now see the actual error with more detail: the YAML line the failed to parse, for example ([#467](https://github.com/go-task/task/issues/467)).
|
||||
- A JSON Schema was published [here](https://json.schemastore.org/taskfile.json) and is automatically being used by some editors like Visual Studio Code ([#135](https://github.com/go-task/task/issues/135)).
|
||||
- Print task name before the command in the log output ([#398](https://github.com/go-task/task/issues/398)).
|
||||
|
||||
## v3.3.0 - 2021-03-20
|
||||
|
||||
- Add support for delegating CLI arguments to commands with `--` and a special `CLI_ARGS` variable ([#327](https://github.com/go-task/task/issues/327)).
|
||||
- Add a `--concurrency` (alias `-C`) flag, to limit the number of tasks that run concurrently. This is useful for heavy workloads. ([#345](https://github.com/go-task/task/issues/345)).
|
||||
|
||||
## v3.2.2 - 2021-01-12
|
||||
|
||||
- Improve performance of `--list` and `--summary` by skipping running shell variables for these flags ([#332](https://github.com/go-task/task/issues/332)).
|
||||
- Fixed a bug where an environment in a Taskfile was not always overridable by the system environment ([#425](https://github.com/go-task/task/issues/425)).
|
||||
- Fixed environment from .env files not being available as variables ([#379](https://github.com/go-task/task/issues/379)).
|
||||
- The install script is now working for ARM platforms ([#428](https://github.com/go-task/task/issues/428)).
|
||||
|
||||
## v3.2.1 - 2021-01-09
|
||||
|
||||
- Fixed some bugs and regressions regarding dynamic variables and directories ([#426](https://github.com/go-task/task/issues/426)).
|
||||
- The [slim-sprig](https://github.com/go-task/slim-sprig) package was updated with the upstream [sprig](https://github.com/Masterminds/sprig).
|
||||
|
||||
## v3.2.0 - 2021-01-07
|
||||
|
||||
- Fix the `.task` directory being created in the task directory instead of the Taskfile directory ([#247](https://github.com/go-task/task/issues/247)).
|
||||
- Fix a bug where dynamic variables (those declared with `sh:`) were not running in the task directory when the task has a custom dir or it was in an included Taskfile ([#384](https://github.com/go-task/task/issues/384)).
|
||||
- The watch feature (via the `--watch` flag) got a few different bug fixes and should be more stable now ([#423](https://github.com/go-task/task/issues/423), [#365](https://github.com/go-task/task/issues/365)).
|
||||
|
||||
## v3.1.0 - 2021-01-03
|
||||
|
||||
- Fix a bug when the checksum up-to-date resolution is used by a task with a custom `label:` attribute ([#412](https://github.com/go-task/task/issues/412)).
|
||||
- Starting from this release, we're releasing official ARMv6 and ARM64 binaries for Linux ([#375](https://github.com/go-task/task/issues/375), [#418](https://github.com/go-task/task/issues/418)).
|
||||
- Task now respects the order of declaration of included Taskfiles when evaluating variables declaring by them ([#393](https://github.com/go-task/task/issues/393)).
|
||||
- `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](https://github.com/go-task/task/issues/403)).
|
||||
|
||||
## v3.0.1 - 2020-12-26
|
||||
|
||||
- Allow use as a library by moving the required packages out of the `internal` directory ([#358](https://github.com/go-task/task/issues/358)).
|
||||
- Do not error if a specified dotenv file does not exist ([#378](https://github.com/go-task/task/issues/378), [#385](https://github.com/go-task/task/issues/385)).
|
||||
- Fix panic when you have empty tasks in your Taskfile ([#338](https://github.com/go-task/task/issues/338), [#362](https://github.com/go-task/task/issues/362)).
|
||||
|
||||
## v3.0.0 - 2020-08-16
|
||||
|
||||
- On `v3`, all CLI variables will be considered global variables ([#336](https://github.com/go-task/task/issues/336), [#341](https://github.com/go-task/task/issues/341))
|
||||
- Add support to `.env` like files ([#324](https://github.com/go-task/task/issues/324), [#356](https://github.com/go-task/task/issues/356)).
|
||||
- Add `label:` to task so you can override the task name in the logs ([\[#321\](https://github.com/go-task/task/issues/321)](https://github.com/go-task/task/issues/321]), [#337](https://github.com/go-task/task/issues/337)).
|
||||
- Refactor how variables work on version 3 ([#311](https://github.com/go-task/task/issues/311)).
|
||||
- Disallow `expansions` on v3 since it has no effect.
|
||||
- `Taskvars.yml` is not automatically included anymore.
|
||||
- `Taskfile_{{OS}}.yml` is not automatically included anymore.
|
||||
- Allow interpolation on `includes`, so you can manually include a Taskfile based on operation system, for example.
|
||||
- Expose `.TASK` variable in templates with the task name ([#252](https://github.com/go-task/task/issues/252)).
|
||||
- Implement short task syntax ([#194](https://github.com/go-task/task/issues/194), [#240](https://github.com/go-task/task/issues/240)).
|
||||
- Added option to make included Taskfile run commands on its own directory ([#260](https://github.com/go-task/task/issues/260), [#144](https://github.com/go-task/task/issues/144))
|
||||
- Taskfiles in version 1 are not supported anymore ([#237](https://github.com/go-task/task/issues/237)).
|
||||
- Added global `method:` option. With this option, you can set a default method to all tasks in a Taskfile ([#246](https://github.com/go-task/task/issues/246)).
|
||||
- Changed default method from `timestamp` to `checksum` ([#246](https://github.com/go-task/task/issues/246)).
|
||||
- New magic variables are now available when using `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](https://github.com/go-task/task/issues/216)).
|
||||
- We're now using [slim-sprig](https://github.com/go-task/slim-sprig) instead of [sprig](https://github.com/Masterminds/sprig), which allowed a file size reduction of about 22% ([#219](https://github.com/go-task/task/issues/219)).
|
||||
- We now use some colors on Task output to better distinguish message types - commands are green, errors are red, etc ([#207](https://github.com/go-task/task/issues/207)).
|
||||
|
||||
## v2.8.1 - 2020-05-20
|
||||
|
||||
- Fix error code for the `--help` flag ([#300](https://github.com/go-task/task/issues/300), [#330](https://github.com/go-task/task/issues/330)).
|
||||
- Print version to stdout instead of stderr ([#299](https://github.com/go-task/task/issues/299), [#329](https://github.com/go-task/task/issues/329)).
|
||||
- Supress `context` errors when using the `--watch` flag ([#313](https://github.com/go-task/task/issues/313), [#317](https://github.com/go-task/task/issues/317)).
|
||||
- Support templating on description ([#276](https://github.com/go-task/task/issues/276), [#283](https://github.com/go-task/task/issues/283)).
|
||||
|
||||
## v2.8.0 - 2019-12-07
|
||||
|
||||
- Add `--parallel` flag (alias `-p`) to run tasks given by the command line in parallel ([#266](https://github.com/go-task/task/issues/266)).
|
||||
- Fixed bug where calling the `task` CLI only informing global vars would not execute the `default` task.
|
||||
- Add hability to silent all tasks by adding `silent: true` a the root of the Taskfile.
|
||||
|
||||
## v2.7.1 - 2019-11-10
|
||||
|
||||
- Fix error being raised when `exit 0` was called ([#251](https://github.com/go-task/task/issues/251)).
|
||||
|
||||
## v2.7.0 - 2019-09-22
|
||||
|
||||
- Fixed panic bug when assigning a global variable ([#229](https://github.com/go-task/task/issues/229), [#243](https://github.com/go-task/task/issues/243)).
|
||||
- A task with `method: checksum` will now re-run if generated files are deleted ([#228](https://github.com/go-task/task/issues/228), [#238](https://github.com/go-task/task/issues/238)).
|
||||
|
||||
## v2.6.0 - 2019-07-21
|
||||
|
||||
- Fixed some bugs regarding minor version checks on `version:`.
|
||||
- Add `preconditions:` to task ([#205](https://github.com/go-task/task/issues/205)).
|
||||
- Create directory informed on `dir:` if it doesn't exist ([#209](https://github.com/go-task/task/issues/209), [#211](https://github.com/go-task/task/issues/211)).
|
||||
- We now have a `--taskfile` flag (alias `-t`), which can be used to run another Taskfile (other than the default `Taskfile.yml`) ([#221](https://github.com/go-task/task/issues/221)).
|
||||
- It's now possible to install Task using Homebrew on Linux ([go-task/homebrew-tap\[#1\](https://github.com/go-task/task/issues/1)](https://github.com/go-task/homebrew-tap/pull/1)).
|
||||
|
||||
## v2.5.2 - 2019-05-11
|
||||
|
||||
- Reverted YAML upgrade due issues with CRLF on Windows ([#201](https://github.com/go-task/task/issues/201), [go-yaml/yaml\[#450\](https://github.com/go-task/task/issues/450)](https://github.com/go-yaml/yaml/issues/450)).
|
||||
- Allow setting global variables through the CLI ([#192](https://github.com/go-task/task/issues/192)).
|
||||
|
||||
## 2.5.1 - 2019-04-27
|
||||
|
||||
- Fixed some issues with interactive command line tools, where sometimes the output were not being shown, and similar issues ([#114](https://github.com/go-task/task/issues/114), [#190](https://github.com/go-task/task/issues/190), [#200](https://github.com/go-task/task/issues/200)).
|
||||
- Upgraded [go-yaml/yaml](https://github.com/go-yaml/yaml) from v2 to v3.
|
||||
|
||||
## v2.5.0 - 2019-03-16
|
||||
|
||||
- We moved from the taskfile.org domain to the new fancy taskfile.dev domain. While stuff is being redirected, we strongly recommend to everyone that use [this install script](https://taskfile.dev/#/installation?id=install-script) to use the new taskfile.dev domain on scripts from now on.
|
||||
- Fixed to the ZSH completion ([#182](https://github.com/go-task/task/issues/182)).
|
||||
- Add [`--summary` flag along with `summary:` task attribute](https://taskfile.org/#/usage?id=display-summary-of-task) ([#180](https://github.com/go-task/task/issues/180)).
|
||||
|
||||
## v2.4.0 - 2019-02-21
|
||||
|
||||
- Allow calling a task of the root Taskfile from an included Taskfile by prefixing it with `:` ([#161](https://github.com/go-task/task/issues/161), [#172](https://github.com/go-task/task/issues/172)).
|
||||
- Add flag to override the `output` option ([#173](https://github.com/go-task/task/issues/173)).
|
||||
- Fix bug where Task was persisting the new checksum on the disk when the Dry Mode is enabled ([#166](https://github.com/go-task/task/issues/166)).
|
||||
- Fix file timestamp issue when the file name has spaces ([#176](https://github.com/go-task/task/issues/176)).
|
||||
- Mitigating path expanding issues on Windows ([#170](https://github.com/go-task/task/issues/170)).
|
||||
|
||||
## v2.3.0 - 2019-01-02
|
||||
|
||||
- On Windows, Task can now be installed using [Scoop](https://scoop.sh/) ([#152](https://github.com/go-task/task/issues/152)).
|
||||
- Fixed issue with file/directory globing ([#153](https://github.com/go-task/task/issues/153)).
|
||||
- Added ability to globally set environment variables ([#138](https://github.com/go-task/task/issues/138), [#159](https://github.com/go-task/task/issues/159)).
|
||||
|
||||
## v2.2.1 - 2018-12-09
|
||||
|
||||
- This repository now uses Go Modules ([#143](https://github.com/go-task/task/issues/143)). We'll still keep the `vendor` directory in sync for some time, though;
|
||||
- Fixing a bug when the Taskfile has no tasks but includes another Taskfile ([#150](https://github.com/go-task/task/issues/150));
|
||||
- Fix a bug when calling another task or a dependency in an included Taskfile ([#151](https://github.com/go-task/task/issues/151)).
|
||||
|
||||
## v2.2.0 - 2018-10-25
|
||||
|
||||
- Added support for [including other Taskfiles](https://taskfile.org/#/usage?id=including-other-taskfiles) ([#98](https://github.com/go-task/task/issues/98))
|
||||
- This should be considered experimental. For now, only including local files is supported, but support for including remote Taskfiles is being discussed. If you have any feedback, please comment on [#98](https://github.com/go-task/task/issues/98).
|
||||
- Task now have a dedicated documentation site: https://taskfile.org
|
||||
- Thanks to [Docsify](https://docsify.js.org/) for making this pretty easy. To check the source code, just take a look at the [docs](https://github.com/go-task/task/tree/main/docs) directory of this repository. Contributions to the documentation is really appreciated.
|
||||
|
||||
## v2.1.1 - 2018-09-17
|
||||
|
||||
- Fix suggestion to use `task --init` not being shown anymore (when a `Taskfile.yml` is not found)
|
||||
- Fix error when using checksum method and no file exists for a source glob ([#131](https://github.com/go-task/task/issues/131))
|
||||
- Fix signal handling when the `--watch` flag is given ([#132](https://github.com/go-task/task/issues/132))
|
||||
|
||||
## v2.1.0 - 2018-08-19
|
||||
|
||||
- Add a `ignore_error` option to task and command ([#123](https://github.com/go-task/task/issues/123))
|
||||
- Add a dry run mode (`--dry` flag) ([#126](https://github.com/go-task/task/issues/126))
|
||||
|
||||
## v2.0.3 - 2018-06-24
|
||||
|
||||
- Expand environment variables on "dir", "sources" and "generates" ([#116](https://github.com/go-task/task/issues/116))
|
||||
- Fix YAML merging syntax ([#112](https://github.com/go-task/task/issues/112))
|
||||
- Add ZSH completion ([#111](https://github.com/go-task/task/issues/111))
|
||||
- Implement new `output` option. Please check out the [documentation](https://github.com/go-task/task#output-syntax)
|
||||
|
||||
## v2.0.2 - 2018-05-01
|
||||
|
||||
- Fix merging of YAML anchors ([#112](https://github.com/go-task/task/issues/112))
|
||||
|
||||
## v2.0.1 - 2018-03-11
|
||||
|
||||
- Fixes panic on `task --list`
|
||||
|
||||
## v2.0.0 - 2018-03-08
|
||||
|
||||
Version 2.0.0 is here, with a new Taskfile format.
|
||||
|
||||
Please, make sure to read the [Taskfile versions](https://github.com/go-task/task/blob/main/TASKFILE_VERSIONS.md) document, since it describes in depth what changed for this version.
|
||||
|
||||
- New Taskfile version 2 ([#77](https://github.com/go-task/task/issues/77))
|
||||
- Possibility to have global variables in the `Taskfile.yml` instead of `Taskvars.yml` ([#66](https://github.com/go-task/task/issues/66))
|
||||
- Small improvements and fixes
|
||||
|
||||
## v1.4.4 - 2017-11-19
|
||||
|
||||
- Handle SIGINT and SIGTERM ([#75](https://github.com/go-task/task/issues/75));
|
||||
- List: print message with there's no task with description;
|
||||
- Expand home dir ("~" symbol) on paths ([#74](https://github.com/go-task/task/issues/74));
|
||||
- Add Snap as an installation method;
|
||||
- Move examples to its own repo;
|
||||
- Watch: also walk on tasks called on on "cmds", and not only on "deps";
|
||||
- Print logs to stderr instead of stdout ([#68](https://github.com/go-task/task/issues/68));
|
||||
- Remove deprecated `set` keyword;
|
||||
- Add checksum based status check, alternative to timestamp based.
|
||||
|
||||
## v1.4.3 - 2017-09-07
|
||||
|
||||
- Allow assigning variables to tasks at run time via CLI ([#33](https://github.com/go-task/task/issues/33))
|
||||
- Added suport for multiline variables from sh ([#64](https://github.com/go-task/task/issues/64))
|
||||
- Fixes env: remove square braces and evaluate shell ([#62](https://github.com/go-task/task/issues/62))
|
||||
- Watch: change watch library and few fixes and improvements
|
||||
- When use watching, cancel and restart long running process on file change ([#59](https://github.com/go-task/task/issues/59) and [#60](https://github.com/go-task/task/issues/60))
|
||||
|
||||
## v1.4.2 - 2017-07-30
|
||||
|
||||
- Flag to set directory of execution
|
||||
- Always echo command if is verbose mode
|
||||
- Add silent mode to disable echoing of commands
|
||||
- Fixes and improvements of variables ([#56](https://github.com/go-task/task/issues/56))
|
||||
|
||||
## v1.4.1 - 2017-07-15
|
||||
|
||||
- Allow use of YAML for dynamic variables instead of $ prefix
|
||||
- `VAR: {sh: echo Hello}` instead of `VAR: $echo Hello`
|
||||
- Add `--list` (or `-l`) flag to print existing tasks
|
||||
- OS specific Taskvars file (e.g. `Taskvars_windows.yml`, `Taskvars_linux.yml`, etc)
|
||||
- Consider task up-to-date on equal timestamps ([#49](https://github.com/go-task/task/issues/49))
|
||||
- Allow absolute path in generates section ([#48](https://github.com/go-task/task/issues/48))
|
||||
- Bugfix: allow templating when calling deps ([#42](https://github.com/go-task/task/issues/42))
|
||||
- Fix panic for invalid task in cyclic dep detection
|
||||
- Better error output for dynamic variables in Taskvars.yml ([#41](https://github.com/go-task/task/issues/41))
|
||||
- Allow template evaluation in parameters
|
||||
|
||||
## v1.4.0 - 2017-07-06
|
||||
|
||||
- Cache dynamic variables
|
||||
- Add verbose mode (`-v` flag)
|
||||
- Support to task parameters (overriding vars) ([#31](https://github.com/go-task/task/issues/31)) ([#32](https://github.com/go-task/task/issues/32))
|
||||
- Print command, also when "set:" is specified ([#35](https://github.com/go-task/task/issues/35))
|
||||
- Improve task command help text ([#35](https://github.com/go-task/task/issues/35))
|
||||
|
||||
## v1.3.1 - 2017-06-14
|
||||
|
||||
- Fix glob not working on commands ([#28](https://github.com/go-task/task/issues/28))
|
||||
- Add ExeExt template function
|
||||
- Add `--init` flag to create a new Taskfile
|
||||
- Add status option to prevent task from running ([#27](https://github.com/go-task/task/issues/27))
|
||||
- Allow interpolation on `generates` and `sources` attributes ([#26](https://github.com/go-task/task/issues/26))
|
||||
|
||||
## v1.3.0 - 2017-04-24
|
||||
|
||||
- Migrate from os/exec.Cmd to a native Go sh/bash interpreter
|
||||
- This is a potentially breaking change if you use Windows.
|
||||
- Now, `cmd` is not used anymore on Windows. Always use Bash-like syntax for your commands, even on Windows.
|
||||
- Add "ToSlash" and "FromSlash" to template functions
|
||||
- Use functions defined on github.com/Masterminds/sprig
|
||||
- Do not redirect stdin while running variables commands
|
||||
- Using `context` and `errgroup` packages (this will make other tasks to be cancelled, if one returned an error)
|
||||
|
||||
## v1.2.0 - 2017-04-02
|
||||
|
||||
- More tests and Travis integration
|
||||
- Watch a task (experimental)
|
||||
- Possibility to call another task
|
||||
- Fix "=" not being reconized in variables/environment variables
|
||||
- Tasks can now have a description, and help will print them ([#10](https://github.com/go-task/task/issues/10))
|
||||
- Task dependencies now run concurrently
|
||||
- Support for a default task ([#16](https://github.com/go-task/task/issues/16))
|
||||
|
||||
## v1.1.0 - 2017-03-08
|
||||
|
||||
- Support for YAML, TOML and JSON ([#1](https://github.com/go-task/task/issues/1))
|
||||
- Support running command in another directory ([#4](https://github.com/go-task/task/issues/4))
|
||||
- `--force` or `-f` flag to force execution of task even when it's up-to-date
|
||||
- Detection of cyclic dependencies ([#5](https://github.com/go-task/task/issues/5))
|
||||
- Support for variables ([#6](https://github.com/go-task/task/issues/6), [#9](https://github.com/go-task/task/issues/9), [#14](https://github.com/go-task/task/issues/14))
|
||||
- Operation System specific commands and variables ([#13](https://github.com/go-task/task/issues/13))
|
||||
|
||||
## v1.0.0 - 2017-02-28
|
||||
|
||||
- Add LICENSE file
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
slug: /community/
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Community
|
||||
|
||||
Some of the work to improve the Task ecosystem is done by the community, be it installation methods or integrations with code editor. I (the author) am thankful for everyone that helps me to improve the overall experience.
|
||||
|
||||
## Translations
|
||||
|
||||
[@DeronW](https://github.com/DeronW) maintains the [Chinese translation](https://task-zh.readthedocs.io/zh_CN/latest/) of the website [on this repository](https://github.com/DeronW/task).
|
||||
|
||||
## Integrations
|
||||
|
||||
Many of our integrations are contributed and maintained by the community. You can view the full list of community integrations [here](/integrations#community-integrations).
|
||||
|
||||
## Installation methods
|
||||
|
||||
Some installation methods are maintained by third party:
|
||||
|
||||
- [GitHub Actions](https://github.com/arduino/setup-task) by [@arduino](https://github.com/arduino)
|
||||
- [AUR](https://aur.archlinux.org/packages/go-task-bin) by [@carlsmedstad](https://github.com/carlsmedstad)
|
||||
- [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/task.json)
|
||||
- [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/)
|
||||
- [NixOS](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/go-task/default.nix)
|
||||
|
||||
## More
|
||||
|
||||
Also, thanks for all the [code contributors](https://github.com/go-task/task/graphs/contributors), [financial contributors](https://opencollective.com/task), all those who [reported bugs](https://github.com/go-task/task/issues?q=is%3Aissue) and [answered questions](https://github.com/go-task/task/discussions).
|
||||
|
||||
If you know something that is missing in this document, please submit a pull request.
|
||||
@@ -0,0 +1,101 @@
|
||||
---
|
||||
slug: /contributing/
|
||||
sidebar_position: 11
|
||||
---
|
||||
|
||||
# Contributing
|
||||
|
||||
Contributions to Task are very welcome, but we ask that you read this document before submitting a PR.
|
||||
|
||||
:::note
|
||||
|
||||
This document applies to the core [Task][task] repository _and_ [Task for Visual Studio Code][vscode-task].
|
||||
|
||||
:::
|
||||
|
||||
## Before you start
|
||||
|
||||
- **Check existing work** - Is there an existing PR? Are there issues discussing the feature/change you want to make? Please make sure you consider/address these discussions in your work.
|
||||
- **Backwards compatibility** - Will your change break existing Taskfiles? It is much more likely that your change will merged if it backwards compatible. Is there an approach you can take that maintains this compatibility? If not, consider opening an issue first so that API changes can be discussed before you invest your time into a PR.
|
||||
- **Experiments** - If there is no way to make your change backward compatible then there is a procedure to introduce breaking changes into minor versions. We call these "\[experiments\]\[experiments\]". If you're intending to work on an experiment, then please read the \[experiments workflow\]\[experiments-workflow\] document carefully and submit a proposal first.
|
||||
|
||||
## 1. Setup
|
||||
|
||||
- **Go** - Task is written in [Go][go]. We always support the latest two major Go versions, so make sure your version is recent enough.
|
||||
- **Node.js** - [Node.js][nodejs] is used to host Task's documentation server and is required if you want to run this server locally. It is also required if you want to contribute to the Visual Studio Code extension.
|
||||
- **Yarn** - [Yarn][yarn] is the Node.js package manager used by Task.
|
||||
|
||||
## 2. Making changes
|
||||
|
||||
- **Code style** - Try to maintain the existing code style where possible. Go code should be formatted by [`gofumpt`][gofumpt] and linted using [`golangci-lint`][golangci-lint]. Any Markdown or TypeScript files should be formatted and linted by [Prettier][prettier]. This style is enforced by our CI to ensure that we have a consistent style across the project. You can use the `task lint` command to lint the code locally and the `task lint:fix` command to automatically fix any issues that are found.
|
||||
- **Documentation** - Ensure that you add/update any relevant documentation. See the [updating documentation](#updating-documentation) section below.
|
||||
- **Tests** - Ensure that you add/update any relevant tests and that all tests are passing before submitting the PR. See the [writing tests](#writing-tests) section below.
|
||||
|
||||
### Running your changes
|
||||
|
||||
To run Task with working changes, you can use `go run ./cmd/task`. To run a development build of task against a test Taskfile in `testdata`, you can use `go run ./cmd/task --dir ./testdata/<my_test_dir> <task_name>`.
|
||||
|
||||
To run Task for Visual Studio Code, you can open the project in VSCode and hit F5 (or whatever you debug keybind is set to). This will open a new VSCode window with the extension running. Debugging this way is recommended as it will allow you to set breakpoints and step through the code. Otherwise, you can run `task package` which will generate a `.vsix` file that can be used to manually install the extension.
|
||||
|
||||
### Updating documentation
|
||||
|
||||
Task uses [Docusaurus][docusaurus] to host a documentation server. The code for this is located in the core Task repository. This can be setup and run locally by using `task docs` (requires `nodejs` & `yarn`). All content is written in Markdown and is located in the `docs/docs` directory. All Markdown documents should have an 80 character line wrap limit (enforced by Prettier).
|
||||
|
||||
When making a change, consider whether a change to the [Usage Guide](./usage.md) is necessary. This document contains descriptions and examples of how to use Task features. If you're adding a new feature, try to find an appropriate place to add a new section. If you're updating an existing feature, ensure that the documentation and any examples are up-to-date. Ensure that any examples follow the [Taskfile Styleguide](./styleguide.md).
|
||||
|
||||
If you added a new field, command or flag, ensure that you add it to the [API Reference](./api_reference.md). New fields also need to be added to the [JSON Schema][json-schema]. The descriptions for fields in the API reference and the schema should match.
|
||||
|
||||
### Writing tests
|
||||
|
||||
A lot of Task's tests are held in the `task_test.go` file in the project root and this is where you'll most likely want to add new ones too. Most of these tests also have a subdirectory in the `testdata` directory where any Taskfiles/data required to run the tests are stored.
|
||||
|
||||
When making a changes, consider whether new tests are required. These tests should ensure that the functionality you are adding will continue to work in the future. Existing tests may also need updating if you have changed Task's behavior.
|
||||
|
||||
You may also consider adding unit tests for any new functions you have added. The unit tests should follow the Go convention of being location in a file named `*_test.go` in the same package as the code being tested.
|
||||
|
||||
## 3. Committing your code
|
||||
|
||||
Try to write meaningful commit messages and avoid having too many commits on the PR. Most PRs should likely have a single commit (although for bigger PRs it may be reasonable to split it in a few). Git squash and rebase is your friend!
|
||||
|
||||
If you're not sure how to format your commit message, check out [Conventional Commits][conventional-commits]. This style is not enforced, but it is a good way to make your commit messages more readable and consistent.
|
||||
|
||||
## 4. Submitting a PR
|
||||
|
||||
- **Describe your changes** - Ensure that you provide a comprehensive description of your changes.
|
||||
- **Issue/PR links** - Link any previous work such as related issues or PRs. Please describe how your changes differ to/extend this work.
|
||||
- **Examples** - Add any examples or screenshots that you think are useful to demonstrate the effect of your changes.
|
||||
- **Draft PRs** - If your changes are incomplete, but you would like to discuss them, open the PR as a draft and add a comment to start a discussion. Using comments rather than the PR description allows the description to be updated later while preserving any discussions.
|
||||
|
||||
## FAQ
|
||||
|
||||
> I want to contribute, where do I start?
|
||||
|
||||
Take a look at the list of [open issues for Task][task-open-issues] or [Task for Visual Studio Code][vscode-task-open-issues]. We have a [good first issue][good-first-issue] label for simpler issues that are ideal for first time contributions.
|
||||
|
||||
All kinds of contributions are welcome, whether its a typo fix or a shiny new feature. You can also contribute by upvoting/commenting on issues, helping to answer questions or contributing to other [community projects](./community.md).
|
||||
|
||||
> I'm stuck, where can I get help?
|
||||
|
||||
If you have questions, feel free to ask them in the `#help` forum channel on our [Discord server][discord-server] or open a [Discussion][discussion] on GitHub.
|
||||
|
||||
---
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[task]: https://github.com/go-task/task
|
||||
[vscode-task]: https://github.com/go-task/vscode-task
|
||||
[go]: https://go.dev
|
||||
[gofumpt]: https://github.com/mvdan/gofumpt
|
||||
[golangci-lint]: https://golangci-lint.run
|
||||
[prettier]: https://prettier.io
|
||||
[nodejs]: https://nodejs.org/en/
|
||||
[yarn]: https://yarnpkg.com/
|
||||
[docusaurus]: https://docusaurus.io
|
||||
[json-schema]: https://github.com/go-task/task/blob/main/docs/static/schema.json
|
||||
[task-open-issues]: https://github.com/go-task/task/issues
|
||||
[vscode-task-open-issues]: https://github.com/go-task/vscode-task/issues
|
||||
[good-first-issue]: https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
|
||||
[discord-server]: https://discord.gg/6TY36E39UK
|
||||
[discussion]: https://github.com/go-task/task/discussions
|
||||
[conventional-commits]: https://www.conventionalcommits.org
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
slug: /donate/
|
||||
sidebar_position: 15
|
||||
---
|
||||
|
||||
# Donate
|
||||
|
||||
If you find this project useful, you can consider donating by using one of the channels listed below.
|
||||
|
||||
This is just a way of saying "thank you", it won't give you any benefits like higher priority on issues or something similar.
|
||||
|
||||
Companies who donate at least $50/month will be featured as a "Gold Sponsor" in the website homepage and on the GitHub repository README. Make contact with [@andreynering][] with the logo you want to be shown. Suspect businesses (gambling, casinos, etc) won't be allowed, though.
|
||||
|
||||
## GitHub Sponsors
|
||||
|
||||
The preferred way to donate to the maintainers is via GitHub Sponsors. Just use the following links to do your donation:
|
||||
|
||||
- [@andreynering](https://github.com/sponsors/andreynering)
|
||||
- [@pd93](https://github.com/sponsors/pd93)
|
||||
|
||||
## Open Collective
|
||||
|
||||
If you prefer [Open Collective](https://opencollective.com/task) you can donate by using these links:
|
||||
|
||||
- [$2 per month](https://opencollective.com/task/contribute/backer-4034/checkout)
|
||||
- [$5 per month](https://opencollective.com/task/contribute/supporter-8404/checkout)
|
||||
- [$20 per month](https://opencollective.com/task/contribute/sponsor-4035/checkout)
|
||||
- [$50 per month](https://opencollective.com/task/contribute/sponsor-28775/checkout)
|
||||
- [Custom value - One-time donation option supported](https://opencollective.com/task/donate)
|
||||
|
||||
## PayPal
|
||||
|
||||
You can donate to [@andreynering][] via PayPal as well:
|
||||
|
||||
- [Any value - One-time donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A¤cy_code=USD&source=url)
|
||||
|
||||
## PIX (Brazil only)
|
||||
|
||||
And if you're Brazilian, you can also donate to [@andreynering][] via PIX by [using this QR Code](/img/pix.png).
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[@andreynering]: https://github.com/andreynering
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
slug: /experiments/
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Experiments
|
||||
|
||||
:::caution
|
||||
|
||||
All experimental features are subject to breaking changes and/or removal _at any time_. We strongly recommend that you do not use these features in a production environment. They are intended for testing and feedback only.
|
||||
|
||||
:::
|
||||
|
||||
In order to allow Task to evolve quickly, we roll out breaking changes to minor versions behind experimental flags. This allows us to gather feedback on breaking changes before committing to a major release. This document describes the current set of experimental features and the deprecated feature that they are intended to replace.
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of Task to test out experimental features. You can also disable a feature by specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for permanently enabling experimental features in your environment.
|
||||
|
||||
Flags will always override environment variables.
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
Each section below details an experiment or deprecation and explains what the flags/environment variables to enable the experiment are and how the feature's behavior will change. It will also explain what you need to do to migrate any existing Taskfiles to the new behavior.
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
{Short explanation of how users should migrate to the new behavior}
|
||||
|
||||
-->
|
||||
|
||||
### ![deprecated][] Version 2 Schema ([#1197][deprecate-version-2-schema])
|
||||
|
||||
The Taskfile v2 schema was introduced in March 2018 and replaced by version 3 in August the following year. Users have had a long time to update and so we feel that it is time to tidy up the codebase and focus on new functionality instead.
|
||||
|
||||
This notice does not mean that we are immediately removing support for version 2 schemas. However, support will not be extended to future major releases and we _strongly recommend_ that anybody still using a version 2 schema upgrades to version 3 as soon as possible.
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
slug: /experiments/workflow/
|
||||
---
|
||||
|
||||
# Workflow
|
||||
|
||||
Experiments are a way for us to test out new features in Task before committing to them in a major release. Because this concept is built around the idea of feedback from our community, we have built a workflow for the process of introducing these changes. This ensures that experiments are given the attention and time that they need and that we are getting the best possible results out of them.
|
||||
|
||||
The sections below describe the various stages that an experiment must go through from its proposal all the way to being released in a major version of Task.
|
||||
|
||||
## 1. Proposal
|
||||
|
||||
All experimental features start with a proposal in the form of a GitHub issue. If the maintainers decide that an issue has enough support and is a breaking change or is complex/controversial enough to require user feedback, then the issue will be marked with the ![proposal][] label. At this point, the issue becomes a proposal and a period of consultation begins. During this period, we request that users provide feedback on the proposal and how it might effect their use of Task. It is up to the discretion of the maintainers to decide how long this period lasts.
|
||||
|
||||
## 2. Draft
|
||||
|
||||
Once a proposal's consultation ends, a contributor may pick up the work and begin the initial implementation. Once a PR is opened, the maintainers will ensure that it meets the requirements for an experimental feature (i.e. flags are in the right format etc) and merge the feature. Once this code is released, the status will be updated via the ![draft][] label. This indicates that an implementation is now available for use in a release and the experiment is open for feedback.
|
||||
|
||||
:::note
|
||||
|
||||
During the draft period, major changes to the implementation may be made based on the feedback received from users. There are _no stability guarantees_ and experimental features may be abandoned _at any time_.
|
||||
|
||||
:::
|
||||
|
||||
## 3. Candidate
|
||||
|
||||
Once an acceptable level of consensus has been reached by the community and feedback/changes are less frequent/significant, the status may be updated via the ![candidate][] label. This indicates that a proposal is _likely_ to accepted and will enter a period for final comments and minor changes.
|
||||
|
||||
## 4. Stable
|
||||
|
||||
Once a suitable amount of time has passed with no changes or feedback, an experiment will be given the ![stable][] label. At this point, the functionality will be treated like any other feature in Task and any changes _must_ be backward compatible. This allows users to migrate to the new functionality without having to worry about anything breaking in future releases. This provides the best experience for users migrating to a new major version.
|
||||
|
||||
## 5. Released
|
||||
|
||||
When making a new major release of Task, all experiments marked as ![stable][] will move to ![released][] and their behaviors will become the new default in Task. Experiments in an earlier stage (i.e. not stable) cannot be released and so will continue to be experiments in the new version.
|
||||
|
||||
## Abandoned / Superseded
|
||||
|
||||
If an experiment is unsuccessful at any point then it will be given the ![abandoned][] or ![superseded][] labels depending on which is more suitable. These experiments will be removed from Task.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[proposal]: https://img.shields.io/badge/experiment:%20proposal-purple
|
||||
[draft]: https://img.shields.io/badge/experiment:%20draft-purple
|
||||
[candidate]: https://img.shields.io/badge/experiment:%20candidate-purple
|
||||
[stable]: https://img.shields.io/badge/experiment:%20stable-purple
|
||||
[released]: https://img.shields.io/badge/experiment:%20released-purple
|
||||
[abandoned]: https://img.shields.io/badge/experiment:%20abandoned-purple
|
||||
[superseded]: https://img.shields.io/badge/experiment:%20superseded-purple
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
slug: /faq/
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# FAQ
|
||||
|
||||
This page contains a list of frequently asked questions about Task.
|
||||
|
||||
## Why won't my task update my shell environment?
|
||||
|
||||
This is a limitation of how shells work. Task runs as a subprocess of your current shell, so it can't change the environment of the shell that started it. This limitation is shared by other task runners and build tools too.
|
||||
|
||||
A common way to work around this is to create a task that will generate output that can be parsed by your shell. For example, to set an environment variable on your shell you can write a task like this:
|
||||
|
||||
```yaml
|
||||
my-shell-env:
|
||||
cmds:
|
||||
- echo "export FOO=foo"
|
||||
- echo "export BAR=bar"
|
||||
```
|
||||
|
||||
Now run `eval $(task my-shell-env)` and the variables `$FOO` and `$BAR` will be available in your shell.
|
||||
|
||||
## I can't reuse my shell in a task's commands
|
||||
|
||||
Task runs each command as a separate shell process, so something you do in one command won't effect any future commands. For example, this won't work:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- a=foo
|
||||
- echo $a
|
||||
# outputs ""
|
||||
```
|
||||
|
||||
To work around this you can either use a multiline command:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- |
|
||||
a=foo
|
||||
echo $a
|
||||
# outputs "foo"
|
||||
```
|
||||
|
||||
Or for more complex multi-line commands it is recommended to move your code into a separate file and call that instead:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- ./foo-printer.bash
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
a=foo
|
||||
echo $a
|
||||
```
|
||||
|
||||
## 'x' builtin command doesn't work on Windows
|
||||
|
||||
The default shell on Windows (`cmd` and `powershell`) do not have commands like `rm` and `cp` available as builtins. This means that these commands won't work. If you want to make your Taskfile fully cross-platform, you'll need to work around this limitation using one of the following methods:
|
||||
|
||||
- Use the `{{OS}}` function to run an OS-specific script.
|
||||
- Use something like `{{if eq OS "windows"}}powershell {{end}}<my_cmd>` to detect windows and run the command in Powershell directly.
|
||||
- Use a shell on Windows that supports these commands as builtins, such as [Git Bash][git-bash] or [WSL][wsl].
|
||||
|
||||
We want to make improvements to this part of Task and the issues below track this work. Constructive comments and contributions are very welcome!
|
||||
|
||||
- [#197](https://github.com/go-task/task/issues/197)
|
||||
- [mvdan/sh#93](https://github.com/mvdan/sh/issues/93)
|
||||
- [mvdan/sh#97](https://github.com/mvdan/sh/issues/97)
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[git-bash]: https://gitforwindows.org/
|
||||
[wsl]: https://learn.microsoft.com/en-us/windows/wsl/install
|
||||
@@ -0,0 +1,250 @@
|
||||
---
|
||||
slug: /installation/
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
Task offers many installation methods. Check out the available methods below.
|
||||
|
||||
## Package Managers
|
||||
|
||||
### Homebrew
|
||||
|
||||
If you're on macOS or Linux and have [Homebrew][homebrew] installed, getting Task is as simple as running:
|
||||
|
||||
```bash
|
||||
brew install go-task/tap/go-task
|
||||
```
|
||||
|
||||
The above Formula is [maintained by ourselves](https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb).
|
||||
|
||||
Recently, Task was also made available [on the official Homebrew repository](https://formulae.brew.sh/formula/go-task), so you also have that option if you prefer:
|
||||
|
||||
```bash
|
||||
brew install go-task
|
||||
```
|
||||
|
||||
### Snap
|
||||
|
||||
Task is available in [Snapcraft][snapcraft], but keep in mind that your Linux distribution should allow classic confinement for Snaps to Task work right:
|
||||
|
||||
```bash
|
||||
sudo snap install task --classic
|
||||
```
|
||||
|
||||
### Chocolatey
|
||||
|
||||
If you're on Windows and have [Chocolatey][choco] installed, getting Task is as simple as running:
|
||||
|
||||
```bash
|
||||
choco install go-task
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
|
||||
### Scoop
|
||||
|
||||
If you're on Windows and have [Scoop][scoop] installed, getting Task is as simple as running:
|
||||
|
||||
```cmd
|
||||
scoop install task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may take some time until it's available on Scoop.
|
||||
|
||||
### AUR
|
||||
|
||||
If you're on Arch Linux you can install Task from [AUR](https://aur.archlinux.org/packages/go-task-bin) using your favorite package manager such as `yay`, `pacaur` or `yaourt`:
|
||||
|
||||
```cmd
|
||||
yay -S go-task-bin
|
||||
```
|
||||
|
||||
Alternatively, there's [this package](https://aur.archlinux.org/packages/go-task) which installs from the source code instead of downloading the binary from the [releases page](https://github.com/go-task/task/releases):
|
||||
|
||||
```cmd
|
||||
yay -S go-task
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
|
||||
### Fedora
|
||||
|
||||
If you're on Fedora Linux you can install Task from the official [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/) repository using `dnf`:
|
||||
|
||||
```cmd
|
||||
sudo dnf install go-task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may take some time until it's available in [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/).
|
||||
|
||||
### Nix
|
||||
|
||||
If you're on NixOS or have Nix installed you can install Task from [nixpkgs](https://github.com/NixOS/nixpkgs):
|
||||
|
||||
```cmd
|
||||
nix-env -iA nixpkgs.go-task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may take some time until it's available in [nixpkgs](https://github.com/NixOS/nixpkgs).
|
||||
|
||||
### npm
|
||||
|
||||
You can also use Node and npm to install Task by installing [this package](https://www.npmjs.com/package/@go-task/cli).
|
||||
|
||||
```bash
|
||||
npm install -g @go-task/cli
|
||||
```
|
||||
|
||||
### Winget
|
||||
|
||||
If you are using Windows and installed the [winget](https://github.com/microsoft/winget-cli) package management tool, you can install Task from [winget-pkgs](https://github.com/microsoft/winget-pkgs).
|
||||
|
||||
```bash
|
||||
winget install Task.Task
|
||||
```
|
||||
|
||||
## Get The Binary
|
||||
|
||||
### Binary
|
||||
|
||||
You can download the binary from the [releases page on GitHub][releases] and add to your `$PATH`.
|
||||
|
||||
DEB and RPM packages are also available.
|
||||
|
||||
The `task_checksums.txt` file contains the SHA-256 checksum for each file.
|
||||
|
||||
### Install Script
|
||||
|
||||
We also have an [install script][installscript] which is very useful in scenarios like CI. Many thanks to [GoDownloader][godownloader] for enabling the easy generation of this script.
|
||||
|
||||
By default, it installs on the `./bin` directory relative to the working directory:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
|
||||
```
|
||||
|
||||
It is possible to override the installation directory with the `-b` parameter. On Linux, common choices are `~/.local/bin` and `~/bin` to install for the current user or `/usr/local/bin` to install for all users:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
|
||||
```
|
||||
|
||||
:::caution
|
||||
|
||||
On macOS and Windows, `~/.local/bin` and `~/bin` are not added to `$PATH` by default.
|
||||
|
||||
:::
|
||||
|
||||
### GitHub Actions
|
||||
|
||||
If you want to install Task in GitHub Actions you can try using [this action](https://github.com/arduino/setup-task) by the Arduino team:
|
||||
|
||||
```yaml
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
|
||||
## Build From Source
|
||||
|
||||
### Go Modules
|
||||
|
||||
Ensure that you have a supported version of [Go][go] properly installed and setup. You can find the minimum required version of Go in the [go.mod](https://github.com/go-task/task/blob/main/go.mod#L3) file.
|
||||
|
||||
You can then install the latest release globally by running:
|
||||
|
||||
```bash
|
||||
go install github.com/go-task/task/v3/cmd/task@latest
|
||||
```
|
||||
|
||||
Or you can install into another directory:
|
||||
|
||||
```bash
|
||||
env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
For CI environments we recommend using the [install script](#install-script) instead, which is faster and more stable, since it'll just download the latest released binary.
|
||||
|
||||
:::
|
||||
|
||||
## Setup completions
|
||||
|
||||
Download the autocompletion file corresponding to your shell.
|
||||
|
||||
[All completions are available on the Task repository](https://github.com/go-task/task/tree/main/completion).
|
||||
|
||||
### Bash
|
||||
|
||||
First, ensure that you installed bash-completion using your package manager.
|
||||
|
||||
Make the completion file executable:
|
||||
|
||||
```
|
||||
chmod +x path/to/task.bash
|
||||
```
|
||||
|
||||
After, add this to your `~/.bash_profile`:
|
||||
|
||||
```shell
|
||||
source path/to/task.bash
|
||||
```
|
||||
|
||||
### ZSH
|
||||
|
||||
Put the `_task` file somewhere in your `$FPATH`:
|
||||
|
||||
```shell
|
||||
mv path/to/_task /usr/local/share/zsh/site-functions/_task
|
||||
```
|
||||
|
||||
Ensure that the following is present in your `~/.zshrc`:
|
||||
|
||||
```shell
|
||||
autoload -U compinit
|
||||
compinit -i
|
||||
```
|
||||
|
||||
ZSH version 5.7 or later is recommended.
|
||||
|
||||
### Fish
|
||||
|
||||
Move the `task.fish` completion script:
|
||||
|
||||
```shell
|
||||
mv path/to/task.fish ~/.config/fish/completions/task.fish
|
||||
```
|
||||
|
||||
### PowerShell
|
||||
|
||||
Open your profile script with:
|
||||
|
||||
```
|
||||
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
|
||||
notepad $profile
|
||||
```
|
||||
|
||||
Add the line and save the file:
|
||||
|
||||
```shell
|
||||
Invoke-Expression -Command path/to/task.ps1
|
||||
```
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[go]: https://golang.org/
|
||||
[snapcraft]: https://snapcraft.io/task
|
||||
[homebrew]: https://brew.sh/
|
||||
[installscript]: https://github.com/go-task/task/blob/main/install-task.sh
|
||||
[releases]: https://github.com/go-task/task/releases
|
||||
[godownloader]: https://github.com/goreleaser/godownloader
|
||||
[choco]: https://chocolatey.org/
|
||||
[scoop]: https://scoop.sh/
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
slug: /integrations/
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Integrations
|
||||
|
||||
## Visual Studio Code Extension
|
||||
|
||||
Task has an [official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task). El código de ese proyecto puede ser encontrado [aquí](https://github.com/go-task/vscode-task). Para usar la extensión es necesario tener instalada la versión v3.23.0+ de Task.
|
||||
|
||||
This extension provides the following features (and more):
|
||||
|
||||
- View tasks in the sidebar.
|
||||
- Ejecuta tareas desde la barra lateral y la paleta de comandos.
|
||||
- Go to definition from the sidebar and command palette.
|
||||
- Run last task command.
|
||||
- Multi-root workspace support.
|
||||
- Initialize a Taskfile in the current workspace.
|
||||
|
||||
To get autocompletion and validation for your Taskfile, see the [Schema](#schema) section below.
|
||||
|
||||

|
||||
|
||||
## Schema
|
||||
|
||||
This was initially created by [@KROSF](https://github.com/KROSF) in [this Gist](https://gist.github.com/KROSF/c5435acf590acd632f71bb720f685895) and is now officially maintained in [this file](https://github.com/go-task/task/blob/main/docs/static/schema.json) and made available at https://taskfile.dev/schema.json. This schema can be used to validate Taskfiles and provide autocompletion in many code editors:
|
||||
|
||||
### Visual Studio Code
|
||||
|
||||
To integrate the schema into VS Code, you need to install the [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) by Red Hat. Any `Taskfile.yml` in your project should automatically be detected and validation/autocompletion should work. If this doesn't work or you want to manually configure it for files with a different name, you can add the following to your `settings.json`:
|
||||
|
||||
```json
|
||||
// settings.json
|
||||
{
|
||||
"yaml.schemas": {
|
||||
"https://taskfile.dev/schema.json": [
|
||||
"**/Taskfile.yml",
|
||||
"./path/to/any/other/taskfile.yml"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can also configure the schema directly inside of a Taskfile by adding the following comment to the top of the file:
|
||||
|
||||
```yaml
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: '3'
|
||||
```
|
||||
|
||||
You can find more information on this in the [YAML language server project](https://github.com/redhat-developer/yaml-language-server).
|
||||
|
||||
## Community Integrations
|
||||
|
||||
In addition to our official integrations, there is an amazing community of developers who have created their own integrations for Task:
|
||||
|
||||
- [Sublime Text Plugin](https://packagecontrol.io/packages/Taskfile) [[source](https://github.com/biozz/sublime-taskfile)] by [@biozz](https://github.com/biozz)
|
||||
- [IntelliJ Plugin](https://plugins.jetbrains.com/plugin/17058-taskfile) [[source](https://github.com/lechuckroh/task-intellij-plugin)] by [@lechuckroh](https://github.com/lechuckroh)
|
||||
- [mk](https://github.com/pycontribs/mk) command line tool recognizes Taskfiles natively.
|
||||
|
||||
If you have made something that integrates with Task, please feel free to open a PR to add it to this list.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
slug: /
|
||||
sidebar_position: 1
|
||||
title: Home
|
||||
---
|
||||
|
||||
# Task
|
||||
|
||||
<div align="center">
|
||||
<img id="logo" src="img/logo.svg" height="250px" width="250px" />
|
||||
</div>
|
||||
|
||||
Task is a task runner / build tool that aims to be simpler and easier to use than, for example, [GNU Make][make].
|
||||
|
||||
Since it's written in [Go][go], Task is just a single binary and has no other dependencies, which means you don't need to mess with any complicated install setups just to use a build tool.
|
||||
|
||||
Once [installed](installation.md), you just need to describe your build tasks using a simple [YAML][yaml] schema in a file called `Taskfile.yml`:
|
||||
|
||||
```yaml title="Taskfile.yml"
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
hello:
|
||||
cmds:
|
||||
- echo 'Hello World from Task!'
|
||||
silent: true
|
||||
```
|
||||
|
||||
And call it by running `task hello` from your terminal.
|
||||
|
||||
The above example is just the start, you can take a look at the [usage](/usage) guide to check the full schema documentation and Task features.
|
||||
|
||||
## Features
|
||||
|
||||
- [Easy installation](installation.md): just download a single binary, add to `$PATH` and you're done! Or you can also install using [Homebrew][homebrew], [Snapcraft][snapcraft], or [Scoop][scoop] if you want.
|
||||
- Available on CIs: by adding [this simple command](installation.md#install-script) to install on your CI script and you're ready to use Task as part of your CI pipeline;
|
||||
- Truly cross-platform: while most build tools only work well on Linux or macOS, Task also supports Windows thanks to [this shell interpreter for Go][sh].
|
||||
- Great for code generation: you can easily [prevent a task from running](/usage#prevent-unnecessary-work) if a given set of files haven't changed since last run (based either on its timestamp or content).
|
||||
|
||||
## Gold Sponsors
|
||||
|
||||
<div class="gold-sponsors">
|
||||
|
||||
| [Appwrite](https://appwrite.io/?utm_source=taskfile.dev&utm_medium=website&utm_campaign=task_oss_fund) |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [](https://appwrite.io/?utm_source=taskfile.dev&utm_medium=website&utm_campaign=task_oss_fund) |
|
||||
|
||||
</div>
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[make]: https://www.gnu.org/software/make/
|
||||
[go]: https://go.dev/
|
||||
[yaml]: http://yaml.org/
|
||||
[homebrew]: https://brew.sh/
|
||||
[snapcraft]: https://snapcraft.io/
|
||||
[scoop]: https://scoop.sh/
|
||||
[sh]: https://github.com/mvdan/sh
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
slug: /releasing/
|
||||
sidebar_position: 13
|
||||
---
|
||||
|
||||
# Releasing
|
||||
|
||||
The release process of Task is done with the help of [GoReleaser][goreleaser]. You can test the release process locally by calling the `test-release` task of the Taskfile.
|
||||
|
||||
[GitHub Actions](https://github.com/go-task/task/actions) should release artifacts automatically when a new Git tag is pushed to `main` branch (raw executables and DEB and RPM packages).
|
||||
|
||||
Since v3.15.0, raw executables can also be reproduced and verified locally by checking out a specific tag and calling `goreleaser build`, using the Go version defined in the above GitHub Actions.
|
||||
|
||||
# Homebrew
|
||||
|
||||
Goreleaser will automatically push a new commit to the [Formula/go-task.rb][gotaskrb] file in the [Homebrew tap][homebrewtap] repository to release the new version.
|
||||
|
||||
# npm
|
||||
|
||||
To release to npm update the version in the [`package.json`][packagejson] file and then run `task npm:publish` to push it.
|
||||
|
||||
# Snapcraft
|
||||
|
||||
The [snap package][snappackage] requires to manual steps to release a new version:
|
||||
|
||||
- Updating the current version on [snapcraft.yaml][snapcraftyaml].
|
||||
- Moving both `amd64`, `armhf` and `arm64` new artifacts to the stable channel on the [Snapcraft dashboard][snapcraftdashboard].
|
||||
|
||||
# Scoop
|
||||
|
||||
Scoop is a command-line package manager for the Windows operating system. Scoop package manifests are maintained by the community. Scoop owners usually take care of updating versions there by editing [this file](https://github.com/ScoopInstaller/Main/blob/master/bucket/task.json). If you think its Task version is outdated, open an issue to let us know.
|
||||
|
||||
# Nix
|
||||
|
||||
Nix is a community owned installation method. Nix package maintainers usually take care of updating versions there by editing [this file](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/tools/go-task/default.nix). If you think its Task version is outdated, open an issue to let us know.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[goreleaser]: https://goreleaser.com/
|
||||
[homebrewtap]: https://github.com/go-task/homebrew-tap
|
||||
[gotaskrb]: https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb
|
||||
[packagejson]: https://github.com/go-task/task/blob/main/package.json#L3
|
||||
[snappackage]: https://github.com/go-task/snap
|
||||
[snapcraftyaml]: https://github.com/go-task/snap/blob/master/snap/snapcraft.yaml#L2
|
||||
[snapcraftdashboard]: https://snapcraft.io/task/releases
|
||||
@@ -0,0 +1,233 @@
|
||||
---
|
||||
slug: /styleguide/
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Styleguide
|
||||
|
||||
This is the official Task styleguide for `Taskfile.yml` files. This guide contains some basic instructions to keep your Taskfile clean and familiar to other users.
|
||||
|
||||
This contains general guidelines, but they don't necessarily need to be strictly followed. Feel free to disagree and proceed differently at some point if you need or want to. Also, feel free to open issues or pull requests with improvements to this guide.
|
||||
|
||||
## Use `Taskfile.yml` and not `taskfile.yml`
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
taskfile.yml
|
||||
|
||||
|
||||
# good
|
||||
Taskfile.yml
|
||||
```
|
||||
|
||||
This is important especially for Linux users. Windows and macOS have case insensitive filesystems, so `taskfile.yml` will end up working, even that not officially supported. On Linux, only `Taskfile.yml` will work, though.
|
||||
|
||||
## Use the correct order of keywords
|
||||
|
||||
- `version:`
|
||||
- `includes:`
|
||||
- Configuration ones, like `output:`, `silent:`, `method:` and `run:`
|
||||
- `vars:`
|
||||
- `env:`, `dotenv:`
|
||||
- `tasks:`
|
||||
|
||||
## Use 2 spaces for indentation
|
||||
|
||||
This is the most common convention for YAML files, and Task follows it.
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
|
||||
|
||||
# good
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
```
|
||||
|
||||
## Separate with spaces the mains sections
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
includes:
|
||||
docker: ./docker/Taskfile.yml
|
||||
output: prefixed
|
||||
vars:
|
||||
FOO: bar
|
||||
env:
|
||||
BAR: baz
|
||||
tasks:
|
||||
# ...
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
docker: ./docker/Taskfile.yml
|
||||
|
||||
output: prefixed
|
||||
|
||||
vars:
|
||||
FOO: bar
|
||||
|
||||
env:
|
||||
BAR: baz
|
||||
|
||||
tasks:
|
||||
# ...
|
||||
```
|
||||
|
||||
## Add spaces between tasks
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
bar:
|
||||
cmds:
|
||||
- echo 'bar'
|
||||
baz:
|
||||
cmds:
|
||||
- echo 'baz'
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
cmds:
|
||||
- echo 'foo'
|
||||
|
||||
bar:
|
||||
cmds:
|
||||
- echo 'bar'
|
||||
|
||||
baz:
|
||||
cmds:
|
||||
- echo 'baz'
|
||||
```
|
||||
|
||||
## Use upper-case variable names
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
binary_name: myapp
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -o {{.binary_name}} .
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
BINARY_NAME: myapp
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -o {{.BINARY_NAME}} .
|
||||
```
|
||||
|
||||
## Don't wrap vars in spaces when templating
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
cmds:
|
||||
- echo '{{ .MESSAGE }}'
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
cmds:
|
||||
- echo '{{.MESSAGE}}'
|
||||
```
|
||||
|
||||
This convention is also used by most people for any Go templating.
|
||||
|
||||
## Separate task name words with a dash
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
do_something_fancy:
|
||||
cmds:
|
||||
- echo 'Do something'
|
||||
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
do-something-fancy:
|
||||
cmds:
|
||||
- echo 'Do something'
|
||||
```
|
||||
|
||||
## Use colon for task namespacing
|
||||
|
||||
```yaml
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
docker:build:
|
||||
cmds:
|
||||
- docker ...
|
||||
|
||||
docker:run:
|
||||
cmds:
|
||||
- docker-compose ...
|
||||
```
|
||||
|
||||
This is also done automatically when using included Taskfiles.
|
||||
|
||||
## Prefer external scripts over complex multi-line commands
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- |
|
||||
for i in $(seq 1 10); do
|
||||
echo $i
|
||||
echo "some other complex logic"
|
||||
done'
|
||||
|
||||
# good
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- ./scripts/my_complex_script.sh
|
||||
```
|
||||
@@ -0,0 +1,240 @@
|
||||
---
|
||||
slug: /taskfile-versions/
|
||||
sidebar_position: 14
|
||||
---
|
||||
|
||||
# Taskfile Versions
|
||||
|
||||
The Taskfile syntax and features changed with time. This document explains what changed on each version and how to upgrade your Taskfile.
|
||||
|
||||
## What the Taskfile version mean
|
||||
|
||||
The Taskfile version follows the Task version. E.g. the change to Taskfile version `2` means that Task `v2.0.0` should be release to support it.
|
||||
|
||||
The `version:` key on Taskfile accepts a semver string, so either `2`, `2.0` or `2.0.0` is accepted. If you choose to use `2.0` Task will not enable future `2.1` features, but if you choose to use `2`, then any `2.x.x` features will be available, but not `3.0.0+`.
|
||||
|
||||
## Version 3 
|
||||
|
||||
These are some major changes done on `v3`:
|
||||
|
||||
- Task's output will now be colored
|
||||
- Added support for `.env` like files
|
||||
- Added `label:` setting to task so one can override how the task name appear in the logs
|
||||
- A global `method:` was added to allow setting the default method, and Task's default changed to `checksum`
|
||||
- Two magic variables were added when using `status:`: `CHECKSUM` and `TIMESTAMP` which contains, respectively, the md5 checksum and greatest modification timestamp of the files listed on `sources:`
|
||||
- Also, the `TASK` variable is always available with the current task name
|
||||
- CLI variables are always treated as global variables
|
||||
- Added `dir:` option to `includes` to allow choosing on which directory an included Taskfile will run:
|
||||
|
||||
```yaml
|
||||
includes:
|
||||
docs:
|
||||
taskfile: ./docs
|
||||
dir: ./docs
|
||||
```
|
||||
|
||||
- Implemented short task syntax. All below syntaxes are equivalent:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
print:
|
||||
cmds:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
print:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
print: echo "Hello, World!"
|
||||
```
|
||||
|
||||
- There was a major refactor on how variables are handled. They're now easier to understand. The `expansions:` setting was removed as it became unnecessary. This is the order in which Task will process variables, each level can see the variables set by the previous one and override those.
|
||||
- Environment variables
|
||||
- Global + CLI variables
|
||||
- Call variables
|
||||
- Task variables
|
||||
|
||||
## Version 2.6
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
Version 2.6 comes with `preconditions` stanza in tasks.
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
upload_environment:
|
||||
preconditions:
|
||||
- test -f .env
|
||||
cmds:
|
||||
- aws s3 cp .env s3://myenvironment
|
||||
```
|
||||
|
||||
Please check the [documentation][includes]
|
||||
|
||||
## Version 2.2
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
Version 2.2 comes with a global `includes` options to include other Taskfiles:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
includes:
|
||||
docs: ./documentation # will look for ./documentation/Taskfile.yml
|
||||
docker: ./DockerTasks.yml
|
||||
```
|
||||
|
||||
## Version 2.1
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
Version 2.1 includes a global `output` option, to allow having more control over how commands output are printed to the console (see [documentation][output] for more info):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
output: prefixed
|
||||
|
||||
tasks:
|
||||
server:
|
||||
cmds:
|
||||
- go run main.go
|
||||
prefix: server
|
||||
```
|
||||
|
||||
From this version it's also possible to ignore errors of a command or task (check documentation [here][ignore_errors]):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
example-1:
|
||||
cmds:
|
||||
- cmd: exit 1
|
||||
ignore_error: true
|
||||
- echo "This will be print"
|
||||
|
||||
example-2:
|
||||
cmds:
|
||||
- exit 1
|
||||
- echo "This will be print"
|
||||
ignore_error: true
|
||||
```
|
||||
|
||||
## Version 2.0
|
||||
|
||||
:::caution
|
||||
|
||||
v2 schema support is [deprecated][deprecate-version-2-schema] and will be removed in a future release.
|
||||
|
||||
:::
|
||||
|
||||
At version 2, we introduced the `version:` key, to allow us to evolve Task with new features without breaking existing Taskfiles. The new syntax is as follows:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
echo:
|
||||
cmds:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
Version 2 allows you to write global variables directly in the Taskfile, if you don't want to create a `Taskvars.yml`:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
vars:
|
||||
GREETING: Hello, World!
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
cmds:
|
||||
- echo "{{.GREETING}}"
|
||||
```
|
||||
|
||||
The variable priority order changed to the following:
|
||||
|
||||
1. Task variables
|
||||
2. Call variables
|
||||
3. Taskfile variables
|
||||
4. Taskvars file variables
|
||||
5. Environment variables
|
||||
|
||||
A new global option was added to configure the number of variables expansions (which default to 2):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
expansions: 3
|
||||
|
||||
vars:
|
||||
FOO: foo
|
||||
BAR: bar
|
||||
BAZ: baz
|
||||
FOOBAR: '{{.FOO}}{{.BAR}}'
|
||||
FOOBARBAZ: '{{.FOOBAR}}{{.BAZ}}'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- echo "{{.FOOBARBAZ}}"
|
||||
```
|
||||
|
||||
## Version 1
|
||||
|
||||
:::caution
|
||||
|
||||
v1 schema support was removed in Task >= v3.0.0.
|
||||
|
||||
:::
|
||||
|
||||
In the first version of the `Taskfile`, the `version:` key was not available, because the tasks was in the root of the YAML document. Like this:
|
||||
|
||||
```yaml
|
||||
echo:
|
||||
cmds:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
The variable priority order was also different:
|
||||
|
||||
1. Call variables
|
||||
2. Environment
|
||||
3. Task variables
|
||||
4. `Taskvars.yml` variables
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[output]: usage.md#output-syntax
|
||||
[ignore_errors]: usage.md#ignore-errors
|
||||
[includes]: usage.md#including-other-taskfiles
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
slug: /translate/
|
||||
sidebar_position: 12
|
||||
---
|
||||
|
||||
# Translate
|
||||
|
||||
Want to help us translate this documentation? In this document we explain how.
|
||||
|
||||
Do NOT edit translated markdown files directly on the GitHub repository! We use [Crowdin][crowdin] to allow contributors on work on translations. The repository is periodically updated with progress from Crowdin.
|
||||
|
||||
If you want to have access to the Crowdin project to be able to suggest translations, please ask for access on the [#translations channel on our Discord server][discord]. If a given language is not being shown to Crowdin yet, just ask and we can configure it.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[crowdin]: https://crowdin.com/project/taskfile
|
||||
[discord]: https://discord.gg/6TY36E39UK
|
||||
1391
docs/i18n/es-ES/docusaurus-plugin-content-docs/current/usage.md
Normal file
1391
docs/i18n/es-ES/docusaurus-plugin-content-docs/current/usage.md
Normal file
File diff suppressed because it is too large
Load Diff
46
docs/i18n/es-ES/docusaurus-theme-classic/footer.json
Normal file
46
docs/i18n/es-ES/docusaurus-theme-classic/footer.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"link.title.Pages": {
|
||||
"message": "Páginas",
|
||||
"description": "The title of the footer links column with title=Pages in the footer"
|
||||
},
|
||||
"link.title.Community": {
|
||||
"message": "Comunidad",
|
||||
"description": "The title of the footer links column with title=Community in the footer"
|
||||
},
|
||||
"link.title.Translations": {
|
||||
"message": "Traducciones",
|
||||
"description": "The title of the footer links column with title=Translations in the footer"
|
||||
},
|
||||
"link.item.label.Installation": {
|
||||
"message": "Instalación",
|
||||
"description": "The label of footer link with label=Installation linking to /installation/"
|
||||
},
|
||||
"link.item.label.Usage": {
|
||||
"message": "Uso",
|
||||
"description": "The label of footer link with label=Usage linking to /usage/"
|
||||
},
|
||||
"link.item.label.Donate": {
|
||||
"message": "Donar",
|
||||
"description": "The label of footer link with label=Donate linking to /donate/"
|
||||
},
|
||||
"link.item.label.GitHub": {
|
||||
"message": "GitHub",
|
||||
"description": "The label of footer link with label=GitHub linking to https://github.com/go-task/task"
|
||||
},
|
||||
"link.item.label.Twitter": {
|
||||
"message": "Twitter",
|
||||
"description": "The label of footer link with label=Twitter linking to https://twitter.com/taskfiledev"
|
||||
},
|
||||
"link.item.label.Mastodon": {
|
||||
"message": "Mastodon",
|
||||
"description": "The label of footer link with label=Mastodon linking to https://fosstodon.org/@task"
|
||||
},
|
||||
"link.item.label.Discord": {
|
||||
"message": "Discord",
|
||||
"description": "The label of footer link with label=Discord linking to https://discord.gg/6TY36E39UK"
|
||||
},
|
||||
"link.item.label.OpenCollective": {
|
||||
"message": "OpenCollective",
|
||||
"description": "The label of footer link with label=OpenCollective linking to https://opencollective.com/task"
|
||||
}
|
||||
}
|
||||
38
docs/i18n/es-ES/docusaurus-theme-classic/navbar.json
Normal file
38
docs/i18n/es-ES/docusaurus-theme-classic/navbar.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"title": {
|
||||
"message": "Task",
|
||||
"description": "The title in the navbar"
|
||||
},
|
||||
"item.label.Installation": {
|
||||
"message": "Instalación",
|
||||
"description": "Navbar item with label Installation"
|
||||
},
|
||||
"item.label.Usage": {
|
||||
"message": "Guía de uso",
|
||||
"description": "Navbar item with label Usage"
|
||||
},
|
||||
"item.label.API": {
|
||||
"message": "API",
|
||||
"description": "Navbar item with label API"
|
||||
},
|
||||
"item.label.Donate": {
|
||||
"message": "Donar",
|
||||
"description": "Navbar item with label Donate"
|
||||
},
|
||||
"item.label.GitHub": {
|
||||
"message": "GitHub",
|
||||
"description": "Navbar item with label GitHub"
|
||||
},
|
||||
"item.label.Twitter": {
|
||||
"message": "Twitter",
|
||||
"description": "Navbar item with label Twitter"
|
||||
},
|
||||
"item.label.Mastodon": {
|
||||
"message": "Mastodon",
|
||||
"description": "Navbar item with label Mastodon"
|
||||
},
|
||||
"item.label.Discord": {
|
||||
"message": "Discord",
|
||||
"description": "Navbar item with label Discord"
|
||||
}
|
||||
}
|
||||
396
docs/i18n/fr-FR/code.json
Normal file
396
docs/i18n/fr-FR/code.json
Normal file
@@ -0,0 +1,396 @@
|
||||
{
|
||||
"theme.ErrorPageContent.title": {
|
||||
"message": "Cette page a rencontré un problème.",
|
||||
"description": "The title of the fallback page when the page crashed"
|
||||
},
|
||||
"theme.ErrorPageContent.tryAgain": {
|
||||
"message": "Veuillez réessayer",
|
||||
"description": "The label of the button to try again when the page crashed"
|
||||
},
|
||||
"theme.NotFound.title": {
|
||||
"message": "Page non trouvée",
|
||||
"description": "The title of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p1": {
|
||||
"message": "Nous n'avons pas trouvé ce que vous recherchiez.",
|
||||
"description": "The first paragraph of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p2": {
|
||||
"message": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et lui faire savoir que son lien est rompu.",
|
||||
"description": "The 2nd paragraph of the 404 page"
|
||||
},
|
||||
"theme.admonition.note": {
|
||||
"message": "note",
|
||||
"description": "The default label used for the Note admonition (:::note)"
|
||||
},
|
||||
"theme.admonition.tip": {
|
||||
"message": "conseils",
|
||||
"description": "The default label used for the Tip admonition (:::tip)"
|
||||
},
|
||||
"theme.admonition.danger": {
|
||||
"message": "danger",
|
||||
"description": "The default label used for the Danger admonition (:::danger)"
|
||||
},
|
||||
"theme.admonition.info": {
|
||||
"message": "info",
|
||||
"description": "The default label used for the Info admonition (:::info)"
|
||||
},
|
||||
"theme.admonition.caution": {
|
||||
"message": "attention",
|
||||
"description": "The default label used for the Caution admonition (:::caution)"
|
||||
},
|
||||
"theme.BackToTopButton.buttonAriaLabel": {
|
||||
"message": "Retour en haut de la page",
|
||||
"description": "The ARIA label for the back to top button"
|
||||
},
|
||||
"theme.blog.archive.title": {
|
||||
"message": "Archiver",
|
||||
"description": "The page & hero title of the blog archive page"
|
||||
},
|
||||
"theme.blog.archive.description": {
|
||||
"message": "Archiver",
|
||||
"description": "The page & hero description of the blog archive page"
|
||||
},
|
||||
"theme.blog.paginator.navAriaLabel": {
|
||||
"message": "Navigation dans la page de la liste des blogs",
|
||||
"description": "The ARIA label for the blog pagination"
|
||||
},
|
||||
"theme.blog.paginator.newerEntries": {
|
||||
"message": "Nouvelles entrées",
|
||||
"description": "The label used to navigate to the newer blog posts page (previous page)"
|
||||
},
|
||||
"theme.blog.paginator.olderEntries": {
|
||||
"message": "Anciennes Entrées",
|
||||
"description": "The label used to navigate to the older blog posts page (next page)"
|
||||
},
|
||||
"theme.blog.post.paginator.navAriaLabel": {
|
||||
"message": "Navigation dans la page d'article du blog",
|
||||
"description": "The ARIA label for the blog posts pagination"
|
||||
},
|
||||
"theme.blog.post.paginator.newerPost": {
|
||||
"message": "Article récent",
|
||||
"description": "The blog post button label to navigate to the newer/previous post"
|
||||
},
|
||||
"theme.blog.post.paginator.olderPost": {
|
||||
"message": "Article plus ancien",
|
||||
"description": "The blog post button label to navigate to the older/next post"
|
||||
},
|
||||
"theme.blog.post.plurals": {
|
||||
"message": "Un article|{count} articles",
|
||||
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.blog.tagTitle": {
|
||||
"message": "{nPosts} tagués avec « {tagName} »",
|
||||
"description": "The title of the page for a blog tag"
|
||||
},
|
||||
"theme.tags.tagsPageLink": {
|
||||
"message": "Voir tous les tags",
|
||||
"description": "The label of the link targeting the tag list page"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel": {
|
||||
"message": "Basculer entre le mode sombre et le mode clair (actuellement {mode})",
|
||||
"description": "The ARIA label for the navbar color mode toggle"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.dark": {
|
||||
"message": "mode sombre",
|
||||
"description": "The name for the dark color mode"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.light": {
|
||||
"message": "mode clair",
|
||||
"description": "The name for the light color mode"
|
||||
},
|
||||
"theme.docs.breadcrumbs.home": {
|
||||
"message": "Page d’accueil",
|
||||
"description": "The ARIA label for the home page in the breadcrumbs"
|
||||
},
|
||||
"theme.docs.breadcrumbs.navAriaLabel": {
|
||||
"message": "Fil d'Ariane",
|
||||
"description": "The ARIA label for the breadcrumbs"
|
||||
},
|
||||
"theme.docs.DocCard.categoryDescription": {
|
||||
"message": "{count} éléments",
|
||||
"description": "The default description for a category card in the generated index about how many items this category includes"
|
||||
},
|
||||
"theme.docs.paginator.navAriaLabel": {
|
||||
"message": "Navigation dans les pages",
|
||||
"description": "The ARIA label for the docs pagination"
|
||||
},
|
||||
"theme.docs.paginator.previous": {
|
||||
"message": "Précédent",
|
||||
"description": "The label used to navigate to the previous doc"
|
||||
},
|
||||
"theme.docs.paginator.next": {
|
||||
"message": "Suivant",
|
||||
"description": "The label used to navigate to the next doc"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle.nDocsTagged": {
|
||||
"message": "Un document tagué|{count} documents tagués",
|
||||
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle": {
|
||||
"message": "{nDocsTagged} avec \"{tagName}\"",
|
||||
"description": "The title of the page for a docs tag"
|
||||
},
|
||||
"theme.docs.versionBadge.label": {
|
||||
"message": "Version : {versionLabel}"
|
||||
},
|
||||
"theme.docs.versions.unreleasedVersionLabel": {
|
||||
"message": "Ceci est une documentation non publiée pour la version {versionLabel} de {siteTitle}.",
|
||||
"description": "The label used to tell the user that he's browsing an unreleased doc version"
|
||||
},
|
||||
"theme.docs.versions.unmaintainedVersionLabel": {
|
||||
"message": "Ceci est la documentation de {siteTitle} {versionLabel}, qui n'est plus activement maintenue.",
|
||||
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionSuggestionLabel": {
|
||||
"message": "Pour une documentation à jour, consultez la {latestVersionLink} ({versionLabel}).",
|
||||
"description": "The label used to tell the user to check the latest version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionLinkLabel": {
|
||||
"message": "dernière version",
|
||||
"description": "The label used for the latest version suggestion link label"
|
||||
},
|
||||
"theme.common.editThisPage": {
|
||||
"message": "Éditer cette page",
|
||||
"description": "The link label to edit the current page"
|
||||
},
|
||||
"theme.common.headingLinkTitle": {
|
||||
"message": "Lien direct vers l'entête",
|
||||
"description": "Title for link to heading"
|
||||
},
|
||||
"theme.lastUpdated.atDate": {
|
||||
"message": " le {date}",
|
||||
"description": "The words used to describe on which date a page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.byUser": {
|
||||
"message": " par {user}",
|
||||
"description": "The words used to describe by who the page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.lastUpdatedAtBy": {
|
||||
"message": "Dernière mise à jour{atDate}{byUser}",
|
||||
"description": "The sentence used to display when a page has been last updated, and by who"
|
||||
},
|
||||
"theme.navbar.mobileVersionsDropdown.label": {
|
||||
"message": "Versions",
|
||||
"description": "The label for the navbar versions dropdown on mobile view"
|
||||
},
|
||||
"theme.tags.tagsListLabel": {
|
||||
"message": "Tags:",
|
||||
"description": "The label alongside a tag list"
|
||||
},
|
||||
"theme.AnnouncementBar.closeButtonAriaLabel": {
|
||||
"message": "Fermer",
|
||||
"description": "The ARIA label for close button of announcement bar"
|
||||
},
|
||||
"theme.blog.sidebar.navAriaLabel": {
|
||||
"message": "Navigation dans les articles récents du blog",
|
||||
"description": "The ARIA label for recent posts in the blog sidebar"
|
||||
},
|
||||
"theme.CodeBlock.copied": {
|
||||
"message": "Copié",
|
||||
"description": "The copied button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.copyButtonAriaLabel": {
|
||||
"message": "Copier le code dans le presse-papiers",
|
||||
"description": "The ARIA label for copy code blocks button"
|
||||
},
|
||||
"theme.CodeBlock.copy": {
|
||||
"message": "Copier",
|
||||
"description": "The copy button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.wordWrapToggle": {
|
||||
"message": "Basculer le retour à la ligne automatique",
|
||||
"description": "The title attribute for toggle word wrapping button of code block lines"
|
||||
},
|
||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
|
||||
"message": "Plier/Déplier la catégorie '{label}' de la barre latérale",
|
||||
"description": "The ARIA label to toggle the collapsible sidebar category"
|
||||
},
|
||||
"theme.navbar.mobileLanguageDropdown.label": {
|
||||
"message": "Langues",
|
||||
"description": "The label for the mobile language switcher dropdown"
|
||||
},
|
||||
"theme.TOCCollapsible.toggleButtonLabel": {
|
||||
"message": "Sur cette page",
|
||||
"description": "The label used by the button on the collapsible TOC component"
|
||||
},
|
||||
"theme.blog.post.readMore": {
|
||||
"message": "En Savoir Plus",
|
||||
"description": "The label used in blog post item excerpts to link to full blog posts"
|
||||
},
|
||||
"theme.blog.post.readMoreLabel": {
|
||||
"message": "En savoir plus sur {title}",
|
||||
"description": "The ARIA label for the link to full blog posts from excerpts"
|
||||
},
|
||||
"theme.blog.post.readingTime.plurals": {
|
||||
"message": "Une minute de lecture|{readingTime} minutes de lecture",
|
||||
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonTitle": {
|
||||
"message": "Réduire la barre latérale",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonAriaLabel": {
|
||||
"message": "Réduire la barre latérale",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
|
||||
"message": "Fermer la barre de navigation",
|
||||
"description": "The ARIA label for close button of mobile sidebar"
|
||||
},
|
||||
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
|
||||
"message": "Retour au menu principal",
|
||||
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
|
||||
},
|
||||
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
|
||||
"message": "Afficher/Masquer la barre de navigation",
|
||||
"description": "The ARIA label for hamburger menu button of mobile navigation"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonTitle": {
|
||||
"message": "Déplier le menu latéral",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonAriaLabel": {
|
||||
"message": "Déplier le menu latéral",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.SearchBar.seeAll": {
|
||||
"message": "Voir les {count} résultats"
|
||||
},
|
||||
"theme.SearchPage.documentsFound.plurals": {
|
||||
"message": "Un document trouvé |{count} documents trouvés",
|
||||
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.SearchPage.existingResultsTitle": {
|
||||
"message": "Résultats de la recherche pour \"{query}\"",
|
||||
"description": "The search page title for non-empty query"
|
||||
},
|
||||
"theme.SearchPage.emptyResultsTitle": {
|
||||
"message": "Rechercher dans la documentation",
|
||||
"description": "The search page title for empty query"
|
||||
},
|
||||
"theme.SearchPage.inputPlaceholder": {
|
||||
"message": "Saisissez votre recherche ici",
|
||||
"description": "The placeholder for search page input"
|
||||
},
|
||||
"theme.SearchPage.inputLabel": {
|
||||
"message": "Rechercher",
|
||||
"description": "The ARIA label for search page input"
|
||||
},
|
||||
"theme.SearchPage.algoliaLabel": {
|
||||
"message": "Recherche par Algolia",
|
||||
"description": "The ARIA label for Algolia mention"
|
||||
},
|
||||
"theme.SearchPage.noResultsText": {
|
||||
"message": "Aucun résultat trouvé",
|
||||
"description": "The paragraph for empty search result"
|
||||
},
|
||||
"theme.SearchPage.fetchingNewResults": {
|
||||
"message": "Recherche de nouveaux résultats...",
|
||||
"description": "The paragraph for fetching new search results"
|
||||
},
|
||||
"theme.SearchBar.label": {
|
||||
"message": "Rechercher",
|
||||
"description": "The ARIA label and placeholder for search button"
|
||||
},
|
||||
"theme.SearchModal.searchBox.resetButtonTitle": {
|
||||
"message": "Effacer la recherche",
|
||||
"description": "The label and ARIA label for search box reset button"
|
||||
},
|
||||
"theme.SearchModal.searchBox.cancelButtonText": {
|
||||
"message": "Annuler",
|
||||
"description": "The label and ARIA label for search box cancel button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.recentSearchesTitle": {
|
||||
"message": "Récent",
|
||||
"description": "The title for recent searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.noRecentSearchesText": {
|
||||
"message": "Pas de recherches récentes",
|
||||
"description": "The text when no recent searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": {
|
||||
"message": "Enregistrer cette recherche",
|
||||
"description": "The label for save recent search button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": {
|
||||
"message": "Supprimer cette recherche de l'historique",
|
||||
"description": "The label for remove recent search button"
|
||||
},
|
||||
"theme.SearchModal.startScreen.favoriteSearchesTitle": {
|
||||
"message": "Favoris",
|
||||
"description": "The title for favorite searches"
|
||||
},
|
||||
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": {
|
||||
"message": "Supprimer cette recherche des favoris",
|
||||
"description": "The label for remove favorite search button"
|
||||
},
|
||||
"theme.SearchModal.errorScreen.titleText": {
|
||||
"message": "Impossible de récupérer les résultats",
|
||||
"description": "The title for error screen of search modal"
|
||||
},
|
||||
"theme.SearchModal.errorScreen.helpText": {
|
||||
"message": "Vous devriez vérifier votre connexion réseau.",
|
||||
"description": "The help text for error screen of search modal"
|
||||
},
|
||||
"theme.SearchModal.footer.selectText": {
|
||||
"message": "sélectionner",
|
||||
"description": "The explanatory text of the action for the enter key"
|
||||
},
|
||||
"theme.SearchModal.footer.selectKeyAriaLabel": {
|
||||
"message": "Touche Entrée",
|
||||
"description": "The ARIA label for the Enter key button that makes the selection"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateText": {
|
||||
"message": "naviguer",
|
||||
"description": "The explanatory text of the action for the Arrow up and Arrow down key"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateUpKeyAriaLabel": {
|
||||
"message": "Flèche du haut",
|
||||
"description": "The ARIA label for the Arrow up key button that makes the navigation"
|
||||
},
|
||||
"theme.SearchModal.footer.navigateDownKeyAriaLabel": {
|
||||
"message": "Flèche du bas",
|
||||
"description": "The ARIA label for the Arrow down key button that makes the navigation"
|
||||
},
|
||||
"theme.SearchModal.footer.closeText": {
|
||||
"message": "fermer",
|
||||
"description": "The explanatory text of the action for Escape key"
|
||||
},
|
||||
"theme.SearchModal.footer.closeKeyAriaLabel": {
|
||||
"message": "Touche Echap",
|
||||
"description": "The ARIA label for the Escape key button that close the modal"
|
||||
},
|
||||
"theme.SearchModal.footer.searchByText": {
|
||||
"message": "Rechercher par",
|
||||
"description": "The text explain that the search is making by Algolia"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.noResultsText": {
|
||||
"message": "Aucun résultat pour",
|
||||
"description": "The text explains that there are no results for the following search"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.suggestedQueryText": {
|
||||
"message": "Essayez de rechercher",
|
||||
"description": "The text for the suggested query when no results are found for the following search"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.reportMissingResultsText": {
|
||||
"message": "Pensez-vous que cette requête aurait dû retourner des résultats ?",
|
||||
"description": "The text for the question where the user thinks there are missing results"
|
||||
},
|
||||
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": {
|
||||
"message": "Faites-le nous savoir.",
|
||||
"description": "The text for the link to report missing results"
|
||||
},
|
||||
"theme.SearchModal.placeholder": {
|
||||
"message": "Rechercher dans la documentation",
|
||||
"description": "The placeholder of the input of the DocSearch pop-up modal"
|
||||
},
|
||||
"theme.common.skipToMainContent": {
|
||||
"message": "Accéder directement au contenu principal",
|
||||
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
|
||||
},
|
||||
"theme.tags.tagsPageTitle": {
|
||||
"message": "Tags",
|
||||
"description": "The title of the tag list page"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user