Skip to content

@natefinch natefinch released this Dec 12, 2018 · 10 commits to master since this release

Details

Several nice to have fixes that have been waiting for some TLC. The important ones:

  • Binaries compiled with -compile now have support for all the applicable flags from Mage itself, so for example you can do <your binary> -l to list the targets. see https://magefile.org/compiling/ for full details.
  • Specifying GOOS and GOARCH now won't confuse mage. Previously if you attempted to use mage to run go build and specified a different GOOS or GOARCH in your environment variables, those environment variables would change the binary that mage builds out of your magefile, and generally made it not executable on your system. Now that won't happen. To run -compile and create a binary for a different platform, use the -goos and -goarch flags.

Changelog

fix one line imports as mage:imports (#204)
refactor alias/default parsing to support imported packages and namespaces (#203)
GOOS and GOARCH fixes (#202)
Compiled flags (#201)

Assets 20

@natefinch natefinch released this Oct 17, 2018 · 16 commits to master since this release

Bug Fix

This fixes #188 - if you had mixed magefiles in with non-magefiles and then tried to import the magefiles... everything broke. This puts the behavior back to what it was previous to 1.7.0, where we did not set build the magefile itself with the mage build flag.

Changelog

11d1591 dont use -tags=mage when doing mage:imports and compiling (#189)

Assets 20

@natefinch natefinch released this Oct 11, 2018 · 17 commits to master since this release

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)

Assets 20

@natefinch natefinch released this Sep 21, 2018 · 27 commits to master since this release

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)

Assets 20

@natefinch natefinch released this Sep 20, 2018 · 31 commits to master since this release

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)

Assets 20

@natefinch natefinch released this Sep 19, 2018 · 32 commits to master since this release

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)

Assets 20

@natefinch natefinch released this Sep 17, 2018 · 34 commits to master since this release

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)

Assets 20

@natefinch natefinch released this Sep 11, 2018 · 55 commits to master since this release

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

Assets 20

@natefinch natefinch released this Sep 3, 2018 · 57 commits to master since this release

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)

Assets 20
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.