Commit Graph
100 Commits
Author SHA1 Message Date
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
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
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
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
Andrey Nering 55672410cd own Taskfile: small improvement of lint task 2017-07-19 20:24:40 -03:00
Andrey Nering 8a66857fb9 Merge branch 'silent' 2017-07-19 20:20:49 -03:00
Andrey Nering d0b37df615 add silent mode to disable echoing of commands 2017-07-19 20:20:24 -03:00
Andrey Nering dc6cb68327 rename file.go to status.go, and move related code there 2017-07-16 16:15:29 -03:00
Andrey Nering 72250b32d3 replace variables in a task once, instead of mixing these calls with unrelated code
this is the first big step of #45

now t.ReplaceVariable will return a copy of the task, but with variables
replaced

now we don't need to replace variables everywhere in the code, and will
make other refactorings easier
2017-07-16 16:09:55 -03:00
Andrey Nering 726130be09 v1.4.1 2017-07-15 15:52:33 -03:00
Andrey Nering 968a29d869 deduplicate conversion from dep and cmd to call 2017-07-15 15:46:53 -03:00
Andrey Nering ce27e973be hotpath for a blank variable template 2017-07-15 15:38:57 -03:00
Andrey Nering 2607866c49 readme: document new syntax for synamic variables 2017-07-15 15:37:24 -03:00
Andrey Nering e8e914b11c use YAML for dynamix variable instead of $ prefix
$ prefix still works but is now deprecated

before:

    VAR: $echo var

after:

    VAR:
      sh: echo bar

closes #46
2017-07-15 15:28:59 -03:00
Andrey Nering d22b3b0d88 readme: document the task_checksum.txt file on releases
closes #44
2017-07-15 14:52:31 -03:00
Andrey Nering 5ece1d74f6 fix Taskvars.yml vars not available while interpolating vars prop
closes #40
2017-07-15 14:40:58 -03:00
Andrey Nering ac7ab42d94 Create CODE_OF_CONDUCT.md 2017-07-15 14:31:53 -03:00
Andrey Nering 38a3f538f5 add CONTRIBUTING.md 2017-07-15 14:27:45 -03:00
Andrey Nering 998935ea55 add --list (or -l) flag to print existing tasks
If an inexixtent task is given, the help also prints as before

Also fixing README documentation

Closes #51
2017-07-15 14:10:46 -03:00
Andrey Nering e781ac2512 own Taskfile: add task "todo" to print TODOs in code 2017-07-15 13:58:03 -03:00
Andrey Nering ef2695974d os specific Taskvars file
Now it's possible to have Taskfile_windows.yml or Taskvars_linux.yml
(and others).

Asked in a comment in #46
2017-07-15 13:52:02 -03:00
Andrey Nering b552cc2b12 yaml: use UnmarshalStrict instead on Unmarshal
https://github.com/go-yaml/yaml/pull/262
2017-07-15 13:36:22 -03:00
Andrey Nering 4ae9c2445d update deps 2017-07-15 13:34:42 -03:00
Andrey Nering a586fef414 Merge pull request #43 from smyrman/issue-42
Bugfix: allow templating when calling deps
2017-07-09 20:02:39 -03:00
Andrey Nering 5268df6bfd only get variable map twice and implement vars template
ref #40
2017-07-08 16:00:17 -03:00
Andrey Nering 82e1c0f810 refactor: functions reorder (higher level first) 2017-07-08 15:13:27 -03:00
Andrey Nering 81b0ffb7f4 rename: readTaskvarsFile() -> readTaskvars() 2017-07-08 15:10:01 -03:00
Andrey Nering 0da130ee2c refactor: simplify some controls 2017-07-08 15:08:44 -03:00
Andrey Nering 6e880c9027 refactor: don't need to run template on Executor.Dir 2017-07-08 15:01:45 -03:00
Andrey Nering 082fa321cb rename 2 files
- read_taskfile.go -> taskfile.go
- variable_handling.go -> variables.go
2017-07-08 14:58:43 -03:00
Andrey Nering ff1c49f111 refactor: better usage of bytes.Buffer type 2017-07-08 14:57:12 -03:00
Andrey Nering 50f592c540 refactor getVariables() 2017-07-08 14:48:37 -03:00
Andrey Nering 7a7f66dfdc refactor: join task and vars parameters in a single Call struct 2017-07-08 14:34:17 -03:00
Andrey Nering a1140aa62f Merge branch 'cyclic-dep' 2017-07-08 13:36:45 -03:00
Andrey Nering 2dd3564da1 changed cyclic dep detection
since interpolation can be used, detection should be a execution time,
and not before

now, to prevent infinite execution, there's a miximum of 100 calls per
task

closes #37
2017-07-08 13:33:55 -03:00
Andrey Nering fb4b0a187e Merge branch 'issue-37-cyclic-dep' 2017-07-08 10:26:18 -03:00
Andrey Nering ac48ee066e fix panic for invalid task in cyclic dep detection
resolves partly #37
2017-07-08 10:25:15 -03:00
Andrey Nering 06031efc09 cyclic: refactor to return error instead 2017-07-08 10:13:56 -03:00
Andrey Nering 9bea80b862 Merge pull request #41 from zbindenren/master
better error output for dynamic variables in Taskvars.yml
2017-07-07 07:01:21 -03:00
Andrey Nering 645f77b849 Merge pull request #39 from smyrman/issue-38
Allow template evaluation when calling a task with vars
2017-07-06 21:30:47 -03:00
Andrey Nering dd2c66d2e1 v1.4.0 2017-07-05 21:32:30 -03:00
Andrey Nering 0deb2d78fb improve README documentation 2017-07-05 21:31:41 -03:00
Andrey Nering fdd7e7f2a8 add own Taskfile.yml file 2017-07-05 21:06:12 -03:00
Andrey Nering ad1a440576 cache dymanic variables 2017-07-05 21:03:59 -03:00
Andrey Nering 222b5cb587 add verbose mode (-v flag) 2017-07-05 20:56:31 -03:00
Andrey Nering a1d1f73fe7 update dependencies 2017-07-05 20:46:05 -03:00
Andrey Nering e7f9ace559 rename goreleaser.yml to .goreleaser.yml 2017-07-05 20:39:19 -03:00
Andrey Nering cb72c404f5 Merge pull request #32 from go-task/parameters
Add task parameters
2017-07-05 20:34:42 -03:00
Andrey Nering 01b9bf5289 update README documentation about calling another task 2017-07-05 20:30:58 -03:00
Andrey Nering a52a66ec1c test usage of param with $ prefix 2017-07-05 20:12:40 -03:00
Andrey Nering 313d7089da fix lint 2017-07-05 20:10:45 -03:00
Andrey Nering 06d80e92eb rename Cmd.Params to Cmd.Vars 2017-07-05 20:07:27 -03:00
Andrey Nering e1fc3aa4fb remove support for TOML and JSON
ref #34
2017-07-05 19:56:52 -03:00
Andrey Nering b8fe8d465e refactor: onyl read Taskvars file once 2017-07-03 21:16:10 -03:00
Andrey Nering 196d3cb13d add custom Cmd and Dep types 2017-07-03 21:04:38 -03:00
Andrey Nering a3bfa13670 Merge pull request #35 from smyrman/print-on-set
Print on set
2017-07-03 19:53:03 -03:00
Andrey Nering 789a4c03df Merge branch 'stdout-redir' 2017-07-01 15:33:44 -03:00
Andrey Nering ecfd8e8a62 change all tests to call functions instead of binary directly
I had to temporarely hack github.com/mvdan/sh to fix dir handling
2017-07-01 15:32:13 -03:00
Andrey Nering 9ba44f3e6e allow custom Stdin, Stdout and Stderr while running as a lib 2017-07-01 15:05:51 -03:00
Andrey Nering 03fd5c84ec improvements on README 2017-06-28 21:20:52 -03:00
Andrey Nering 81e0f170ef accept setting dir of execution and improve tests
One test is not yet migrated. First we should have specific
Stdin, Stdout and Stderr for executor.
2017-06-24 20:09:05 -03:00
Andrey Nering 7e06ba1728 update deps 2017-06-24 16:00:10 -03:00
Andrey Nering f8a5825083 readme: improve releases paragraph 2017-06-19 20:55:21 -03:00
Andrey Nering a14f7f215c setup fpm to release .deb and .rpm packages
closes #15
2017-06-19 20:48:39 -03:00
Andrey Nering 8393e8c52f have a consistent release name format
closes #30
2017-06-19 20:31:03 -03:00
Andrey Nering 81d221667b update deps 2017-06-16 14:59:12 -03:00