Mage Versions Save

a Make/rake-like dev tool using Go

v1.7.0

5 years ago

Mage:Import

The big feature for this release is mage imports. You can now import targets from another package into another magefile. This is a huge benefit for anyone that wants to reuse common targets, like gofmt etc.

Changelog

0f9693c implement importing magefiles (#187) a7a8e06 Support namespace functions with aliases and defaults (#183) eb66d62 badges (#179)

v1.6.2

5 years ago

Fixes

The big thing in this release is fixing mg.SerialDeps, which was broken in v1.6.0 (and now has tests ro prevent that from happening again).

Changelog

Ensure we print an error if running the compiled magefile fails (#171) actually parse the MAGEFILE_VERBOSE flag (#175) fix serial deps (#177) fix error handling when failing to list magefiles (#174)

v1.6.1

5 years ago

Fixed

PR #172 brought up a problem with systems where the magefile cachedir is on a different drive. On these machines, trying to move the generated mainfile fails because it's not a simple rename, you have to copy the data. However, this defeats the purpose of moving the mainfile, which was just to retain the modtime so the go tool wouldn't think it was newer than the compiled binary.

Upon more reflection the obvious thing to do is just to generate the mainfile tweak its mod time to be old. That's what this change does, which greatly simplifies that code, and fixes the bug.

Changelog

Don't cache mainfiles, just set modtime (#173)

v1.6.0

5 years ago

New Features

If you're running go 1.10 or above, Mage now use the go tool's built-in GOCACHE to determine whether or not to rebuild the binary it runs. This results in a ~100ms slower run time for small magefiles, but it removes the problem where if you change some library your magefile depends on, mage wouldn't realize it and wouldn't rebuild the binary, and thus you'd be running the old (unchanged) code.

Since go 1.9 and below don't have a GOCACHE, we maintain our (somewhat flawed) caching mechanism in those cases.

Note that this depends on the go command that mage uses to compile your magefiles, not the go command used to build mage itself.

Changelog

Rely on GOCACHE rather than our own hashing mechanism (#168)

v1.5.0

5 years ago

v1.5.0 Changelog

New Features

MAGEFILE_IGNOREDEFAULT flag (#167) Add -d flag to set the working directory (#159)

Library Changes

Add sh.Copy (#130)

Bug Fixes

make sure we test that the returned interface is non-nil before converting to error (#166) Ensure dep error propagation (#164) add code so mg.Deps understands namespaces (#163) consider missing cache dir cleaned (#162)

v1.4.0

5 years ago

For real go modules support, with tests and everything. Also changed how we parse the code so that we could remove a ton of code copied from the stdlib (-11k lines!).

Changelog

49bafb8 Go Modules Support (#157) 276737a massive cleanup using go list (#153)

v1.3.0

5 years ago

This release adds a -gocmd to the list of flags you can use with mage. This flag allows you to choose what command mage runs when it builds the binary of your magefile. This can be useful if you have multiple versions of go installed (e.g. with go get golang.org/dl/go1.xx), and different projects need to be built with different versions of go.

Now you can run mage -gocmd go1.11 build . or mage -gocmd go1.8.7 install etc.

The default is to use whatever "go" command is first in your path.

There's also a MAGEFILE_GOCMD environment variable you can set if you want to always default to something other than "go".

Changelog

bd5486e Add support for choosing what binary to run with mage (#146) e592274 new demo video

v1.2.4

5 years ago

v1.2.4 is the newest version of Mage. I stripped out v2 tags in order to keep go modules from requiring the /v2 import path. Mage is and always will be backwards compatible with earlier versions, so there's no reason to move to v2. I had originally moved to v2 with the thought that every new release would be a new major version, since Mage doesn't really need semantic versioning... but that was before semantic import versioning came around.

Apologies for any problems this causes anyone.

Changelog

b0bfbc2 don't default to v2 anymore (#148) 6837488 add go.mod (#145) 0cb9a96 Use go/build from 1.11 to support modules (#144) 01342b9 Add debug flag (#143) b3530f3 Fix dependency logging (#141) 253ba37 move checkdupes into parse (#138) b853551 Check for duplicates with namespace prefixed if any (#137) cfd05cd Output package docs with target list (#134) 198454a fix target library (#131) 7e35744 Log dependencies in runDeps (#128) 80d390c usage: separate commands and options (#96) 0b004e8 Fix panic in 126 (#127) 3ff5dec docs for namespaces (#125) c807db8 Add namespace/subcommand support to Mage (#121) 0ef06c8 Fix doc of mg.Fatalf (#120) 5e51f9a Document requiring mage for 0-install with dep (#116) 771ebed Add -compile flag to compile a static binary (#115) 81dbe70 Fix typo in the targets page (#105) ecff873 Fix broken link (#103) d4ed947 Teach mage clean (#97) 0e9ea17 Add explicit return statements (#99) 6376808 parse: sanitize function doc synopsis (#95) acc8beb Avoid name conflicts with magefiles (#93) 898127b Support for aliases (#58) (#90) a693abc Update _index.en.md (#91) bf7f17a fix mage install (#89) accd8ef update logo with text (#87) aefb6e8 new font for the logo (#86) 58812e2 Enable bootstrap build (#85) ab3ca2f Cleaned up use of mage/types package (#81) 9d728ef remove mg dep from mainfile (#84) 8016235 [site] minor typo fix (#82) 68180eb Fix various typos (#80) 2060ed7 Docs for file sources (#78) 3c8c70c doc context targets (#77) 0eef6fe add serial deps and rename DepsWithContext (#76) fe23edb Add mg.Target (#54) be7943d Support multiple targets (#65) df36722 context for jobs (#32)

v1.0.2

6 years ago

Changelog

2f97430 fix goroot (#74) 5cc3565 travis: update go versions (#67) 3c5af14 website: typo on dependencies page. g should depend on h, not on itself (#73)


Automated with GoReleaser Built with go version go1.9 darwin/amd64

v1.0.1

6 years ago

Changelog

e66e3df fix windows zip and default to draft (#71) 94bef76 fix goroot build and use goreleaser (#70) 0c6ba04 log targets being run when mage is run with -v (#44) (#64) 61c945f passthrough stdin (#63)