1
0
mirror of https://github.com/magefile/mage.git synced 2026-10-24 06:19:18 +03:00

16 Commits

Author SHA1 Message Date
Nate Finch
0b004e8e5c Fix panic in 126 (#127)
fix #126
2018-07-23 16:50:53 -04:00
Ryan Faerman
c807db8c20 Add namespace/subcommand support to Mage (#121)
Introduce an exported Namespace type in mg and use it to generate new targets.
2018-07-22 21:23:34 -04:00
Sunny
63768081a3 parse: sanitize function doc synopsis (#95)
This change adds `sanitizeSynopsis()` function to perform basic
sanitization on the synopsis. If synopsis begins with the function name, it
removes the function to avoid repeating words.
2017-12-29 07:42:55 -05:00
Marcin Białoń
898127b487 Support for aliases (#58) (#90) 2017-11-06 23:42:24 -05:00
James S
ab3ca2f6f8 Cleaned up use of mage/types package (#81)
* * Removed stale type declarations in parse.
* Updated parse and mg to make better use of types package.
* Added function to types package to test for valid function.
* Added function to to types package to wrap a valid FuncType as the
* most greedy of FuncType

* renamed IsFuncType and refactored to return error instead of bool. Made the return value of FuncTypeWrap more clear.

* removed unused type func declarations
2017-10-24 22:12:37 -04:00
Dragos Plesca
68180ebead Fix various typos (#80) 2017-10-22 09:21:27 -04:00
Nate Finch
be7943de50 Support multiple targets (#65)
* support multiple targets

* fix #66

* isolated list test

* add clean target to mage's magefile
2017-10-18 10:40:37 -04:00
James S
df367221b6 context for jobs (#32)
Allows for jobs that take and call with a context.  Closes #25
2017-10-17 23:57:04 -04:00
Nate Finch
2f974307b6 fix goroot (#74) 2017-10-16 23:49:30 -04:00
Nate Finch
8fa000d89f Helpers galore (#26)
* Helpers galore

This commit adds helper functions that should be commonly needed
by many magefiles. It includes command execution handlers as well
as error handlers.

This commit also removes the only two non-stdlib dependencies in
the codebase.  Since mage will likely be vendored into a repo,
it would be nice to avoid cluttering the vendor directory with
dependencies that are only for the build script.
2017-10-02 22:22:21 -04:00
Nate Finch
d674cfaedd minor cleanup (#22)
* some minor cleanup
2017-09-29 18:24:23 -04:00
Nate Finch
8b6c4f7a9d fixes and a test (#15)
fixes #13 

The bug was that non-stdlib imports were failing to be found by the parser.

The problem is that the default importer only imports from compiled files.  But we specifically want to import from source files. For go 1.9 this is easy, go/importer has an importer.For that takes "source".  However, previous to go 1.9, this doesn't exist.  To keep the code working in previous versions, we just grab the code from 1.9's srcimporter and include it in the build, and then conditionally compile in that code if we're not running on go 1.9 or greater (if we are running on go 1.9, we can use the stdlib version, which is better because it'll get fixes etc automatically).

Also added a bunch of tests to ensure that this code won't break again without a test failing.
2017-09-29 09:38:37 -04:00
Nate Finch
9dc8074005 implments configurable default targets (#7) 2017-09-27 00:05:03 -04:00
Nate Finch
d95f2a0d68 works now 2017-09-22 11:27:23 -04:00
Nate Finch
81ced8191d basically works now 2017-09-21 23:26:17 -04:00
Nate Finch
82d2f22ea3 parsing 2017-09-21 16:32:22 -04:00