1
0
mirror of https://github.com/go-task/task.git synced 2024-12-12 10:45:49 +02:00
Commit Graph

1441 Commits

Author SHA1 Message Date
Andrey Nering
2022551b26 checksum: also sum the name of the files, so it changes after renaming 2017-11-02 10:31:34 -02:00
Andrey Nering
baac067a1a expand home dir ("~" symbol) on paths
fixes #74
2017-11-02 10:25:50 -02:00
Andrey Nering
f4216dd67f list tasks: ensure at least one space after colon 2017-11-02 09:45:00 -02:00
Andrey Nering
60186bdcd5 readme: document Snap as an installation method 2017-10-30 21:12:20 -02:00
Andrey Nering
2c2eb1684b readme: fix markdown 2017-10-15 18:03:04 -02:00
Andrey Nering
33b167215d move some packages to the "internal" directory
- this makes it impossible to import these packages outside Task
- as a side effect, it makes the root directory cleaner
2017-10-15 17:58:21 -02:00
Andrey Nering
c53db134c6 move examples to its own repo 2017-10-15 17:55:26 -02:00
Andrey Nering
0513a21e25 update dependencies
also make sure the module that enables /dev/null path of the sh
interpreter is enabled
2017-10-15 17:41:15 -02:00
Andrey Nering
2fc32414f5 project stuff
- move some files to .github/ folder
- add an issue template
- add two more alternatives
2017-10-01 15:46:47 -03:00
Andrey Nering
309bc4ee4c checksum: add tests for filename 2017-10-01 15:06:12 -03:00
Andrey Nering
7977e6fb16 watch: also walk on tasks called on on "cmds" 2017-09-30 15:19:58 -03:00
Andrey Nering
abb19dfbf8 print logs to stderr instead of stdout
also, don't print up-to-date status when the --silent flag was given

closes #68
2017-09-30 14:56:35 -03:00
Andrey Nering
14676dc3f8 checksum: normalize filename 2017-09-30 14:40:11 -03:00
Andrey Nering
c16f8a4d46 checksum: skip directories 2017-09-19 14:03:24 -03:00
Andrey Nering
48bf09da21 remove deprecated set keyword 2017-09-17 11:24:30 -03:00
Andrey Nering
c295a1998a add checksum based status check, alternative to timestamp based 2017-09-17 11:06:47 -03:00
Andrey Nering
95f7b9443f v1.4.3 2017-09-07 14:40:54 -03:00
Andrey Nering
0160f5dd30 update deps
fixes #67 fixed upstream on mvdan/sh#159
2017-09-07 14:02:52 -03:00
Andrey Nering
f3097845b4 allow assigning variables to tasks at run time via CLI
using a similar syntax than setting env variables to command in bash,
but used right after the task:

```bash
task print MESSAGE=Hello!
```

closes #33
2017-09-07 13:57:06 -03:00
Andrey Nering
5e72de4ba2 Revert "execext: use sync.Pool to instantiate parser and runner"
This reverts commit 451b965fb0.
2017-09-07 10:40:21 -03:00
Sindre Røkenes Myren
7a64530e83 Added suport for multiline variables from sh
Instead of giving an error on multiline results from sh, the results are
now stored as is, except that the last newline is stripped away to make
the output of most commands easy to use in shell commands.

Two helper functions have been added to help deal with multi-line
results. In addition, previous PascalCase template function names have
been renamed to camelCase for consistency with the sprig lib.
2017-09-04 10:14:09 +02:00
Andrey Nering
36f3be9979 travis: test Go 1.8 and 1.9 2017-09-02 11:42:33 -03:00
Andrey Nering
451b965fb0 execext: use sync.Pool to instantiate parser and runner
A benchmark was added. The performance improvement is considerable:

BenchmarkNoPool-4   	   30000	     43405 ns/op
BenchmarkPool-4     	   20000	     71219 ns/op
2017-09-02 11:32:24 -03:00
Andrey Nering
2b2852aad7 update deps and moving from github.com/mvdan/sh to mvdan.cc/sh 2017-09-02 11:19:00 -03:00
Sindre Røkenes Myren
72bfd94329 Fixes env: remove square braces and evaluate shell (#62)
Fixes bug #61, and makes `env` work more similar to `vars` by allowing
dynamic shell values to be evaluated as part of `CompiledTask`.
2017-08-16 08:04:58 -03:00
Andrey Nering
300376b0b1 update README 2017-08-05 14:52:32 -03:00
Andrey Nering
e67792177d execext: fix sh 2017-08-05 14:20:44 -03:00
Andrey Nering
0f24fd593e update dependencies
- add watch
- remove fsnotify
- update others
2017-08-05 14:13:35 -03:00
Andrey Nering
23ec6c721d Merge branch 'watch' 2017-08-05 14:06:46 -03:00
Andrey Nering
26761e5445 watch: isContextError is as a var func 2017-08-05 14:04:34 -03:00
Andrey Nering
e78e4e6a2e watch: ignore usually big dirs
Two items by now:
- ".git"
- "node_modules"
2017-08-05 13:35:10 -03:00
Andrey Nering
e765b7a9c4 do not check for maximum call if is watch 2017-08-05 13:26:30 -03:00
Andrey Nering
c210e34ce3 watch: switch to watcher as waych lib and few fixes
watcher whould be more consistent across differente OSes
2017-08-05 11:50:39 -03:00
Jack Mordaunt
ddd063f29e Cancel and restart long running process on file change by using context.WithCancel(..)
Closes #59
2017-08-04 12:48:15 -03:00
Andrey Nering
a2c96e9cdd re-generate vendor/ folder
maybe a bug on dep? these two files were not copied
2017-07-30 21:09:05 -03:00
Andrey Nering
f2416d68b8 fix travis again
something was wrong with .gitignore rules
2017-07-30 21:00:50 -03:00
Andrey Nering
1eccb61d44 fix travis
somehow the dev.go file was ignored by Git
2017-07-30 20:53:54 -03:00
Andrey Nering
cf2b189fbd v1.4.2 2017-07-30 20:42:15 -03:00
Andrey Nering
394b69676a rename func to handleShVar 2017-07-30 20:36:35 -03:00
Andrey Nering
9704dc5734 reuse of minTime and maxTime funcs 2017-07-30 20:00:35 -03:00
Andrey Nering
f54dde4f78 func isUpToDate should be bound to Task struct 2017-07-30 19:45:59 -03:00
Andrey Nering
70ef9fbcfe rename func: ReplaceVariables -> CompiledTask 2017-07-30 19:34:28 -03:00
Andrey Nering
bb1aff84cf custom stdout for InitTaskfile func 2017-07-30 19:29:49 -03:00
Andrey Nering
dc1ec77da5 own Taskfile: non-verbose test 2017-07-30 19:26:18 -03:00
Andrey Nering
7077b20a54 flag to set directory of execution 2017-07-30 19:24:53 -03:00
Andrey Nering
09e84c2583 always echo command if is verbose mode 2017-07-30 19:21:06 -03:00
Andrey Nering
e3ac6f9e01 fix sh field name 2017-07-30 19:12:26 -03:00
Andrey Nering
f91bbe9397 update deps 2017-07-30 19:11:34 -03:00
Sindre Røkenes Myren
31faf05c3a Reintroduce template evaluation in variables
With a recent commit, template evaluation for variables in tasks got
broken. This reindroudces temmplate evaluation in taks, and resolves
a series of issues that where previouisly present on master, such as:

- Taskvars did not get evaluated as templates.
- Taskvars would, in contrast to the documentation, _override_ task
  variables for the taks called directly via `Executor.Run(args
  ...string)`. This caused different behaviour in the "default" task
  v.s. other tasks.

This commit ensures:
 - Priority order for variables is now according to the documentation,
   also for the "default" task.
 - Variables gets resolved in a particular order to ensure logical
   access to varaibles on template compile time, and that template
   compilation finds place _before_ resolution of dynamic variables.

This change also allows the following to work:

    task:
      vars:
        A: "52"
        B: "{{.A}}"

However, the following will always replace C with the uncompiled
`{{.A}}`:

    task:
      vars:
        A: "52"
        C: "{{.B}}"
        B: "{{.A}}"

Several tests have also been added to prevent this feature from breaking
again. This should hopefully finally resolve issue #40.
2017-07-22 00:50:23 +02:00
Andrey Nering
55672410cd own Taskfile: small improvement of lint task 2017-07-19 20:24:40 -03:00