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

26 Commits

Author SHA1 Message Date
Nate Finch
c9a7036c7c support namespace funcs as aliases and defaults
fixes #181
2018-09-25 23:38:14 -04:00
Nate Finch
e07fbe0a16 add support for aliases to namespaced functions 2018-09-25 23:24:57 -04:00
Nate Finch
a9a0e40d28 Rely on GOCACHE rather than our own hashing mechanism (#168)
use gocache and add some debug timing logs
2018-09-18 23:05:49 -04:00
Nate Finch
c7b4ff9e70 add code so mg.Deps understands namespaces (#163)
* add code so mg.Deps understands namespaces

* unexport all the functype stuff
2018-09-15 23:32:08 -04:00
Nate Finch
276737a086 massive cleanup using go list (#153)
Simplify the code tremendously by using 'go list' instead of go/build, and remove the use of go/types to determine types (since we only care about a couple canonical types).
2018-09-10 18:26:41 -04:00
Nate Finch
bd5486e7f9 Add support for choosing what binary to run with mage (#146)
* add support for choose which go binary to run
* make the compiler configurable
* add a cli flag and update docs
* use go version as part of the binary hash
* add go version to what we display in mage -version
2018-09-06 21:23:00 -04:00
Nate Finch
01342b9221 Add debug flag (#143)
* add a bunch of debug logging
2018-08-31 08:45:43 -06:00
Nate Finch
253ba37b17 move checkdupes into parse (#138)
by putting checkdeps into parse, it gets checked by the parse tests
and it just a cleaner place to put it.
2018-08-26 10:12:01 -04:00
fazal
b853551298 Check for duplicates with namespace prefixed if any (#137)
Check for duplicates with namespace prefixed if any
2018-08-26 09:11:00 -04:00
Nate Finch
cfd05cd422 Output package docs with target list (#134)
* output package doc in mage -l

* add go 1.10 and 1.11 to test harness
2018-08-25 10:21:58 -04:00
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