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

21 Commits

Author SHA1 Message Date
Nate Finch
781bca20f1 fix serial deps 2018-09-20 23:22: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
f0ff90fe6c MAGEFILE_IGNOREDEFAULT flag (#167)
* implement ignore default environment variable
2018-09-16 22:44:37 -04:00
Nate Finch
84e9ed0aea make sure we test that the returned interface is non-nil before converting to error (#166) 2018-09-16 22:01:04 -04:00
Nate Finch
87fe26a399 Ensure dep error propagation (#164)
If you had a tree of deps and the same dep was called from two different branches... it only gets called once. That works, but the error wasn't getting propagated to the other branch, so it wouldn't stop execution. Now it does.
2018-09-16 09:22:23 -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
c01f199512 Add -d flag to set the working directory (#159)
* add -d flag to set the directory in which to run.
2018-09-12 00:03:05 -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
b3530f3587 Fix dependency logging (#141)
we were logging outside the sync.once which means we'd log
even if we didn't actually run the function
2018-08-28 14:47:06 -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
Eric Gourlaouen
7e35744357 Log dependencies in runDeps (#128)
mg: Log dependencies in runDeps
2018-08-20 11:03:52 -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
Eric Gourlaouen
0ef06c8c9a Fix doc of mg.Fatalf (#120)
Indicate the proper origin of the exit code
2018-07-05 12:11:26 -04: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
Nate Finch
9d728eff80 remove mg dep from mainfile (#84)
We now create the context in the mainfile, so as to remove any dependency on
the mg library, since the user may have an older version vendored, that doesn't
have the Context function.

ALso added a test to ensure that we don't import any non-stdlib libraries in the
mainfile to avoid problems like this in the future.
2017-10-24 21:48:32 -04:00
Nate Finch
0eef6fef9d add serial deps and rename DepsWithContext (#76) 2017-10-18 21:34:15 -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
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
ad4762eaab Remove go 1.9 dependency (#10)
stop using sync.map and add error helpers
2017-09-28 12:21:10 -04:00
Nate Finch
108d15daed implement dependency trees (#4)
This code creates a new library 'mg' that lives under the mage
repo, which contains a function, Deps, that lets a function
declare it has dependencies on other functions. These functions
will be run in parallel, and may have their own dependencies.
2017-09-25 11:32:34 -04:00