Mage

1 min read golang, build, tools

Written in 2020. Tools, APIs and prices may have changed since.

Lab note What I wrote down while learning this by building with it. Short by design; the code is in pfeilbr/mage-playground.

learn mage, a make/rake-like build tool using Go. You write plain-old go functions, and Mage automatically uses them as Makefile-like runnable targets.

Install

git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go

Demo

git clone https://github.com/pfeilbr/mage-playground
cd mage-playground
go mod init mage-playground
# NOTE: `go.mod` must exist in same directory as `magefile.go`

# show targets
mage

# run "hello" target
mage hello

Keep learning

Get new guides and courses by email

An occasional email when I publish a new guide, course or post. No spam, and you can unsubscribe any time.

Sent with Buttondown. I never share your address. Prefer a feed? Use the RSS feed.