• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

mage/H21-Sep-2018-

mg/H21-Sep-2018-

parse/H21-Sep-2018-

sh/H21-Sep-2018-

site/H21-Sep-2018-

target/H21-Sep-2018-

.gitattributesH A D21-Sep-201856

.gitignoreH A D21-Sep-2018378

.goreleaser.ymlH A D21-Sep-20181 KiB

.travis.ymlH A D21-Sep-2018562

CONTRIBUTING.mdH A D21-Sep-20181.3 KiB

LICENSEH A D21-Sep-201811.1 KiB

README.mdH A D21-Sep-20182.7 KiB

bootstrap.goH A D21-Sep-2018361

go.modH A D21-Sep-201832

install_test.goH A D21-Sep-2018656

magefile.goH A D21-Sep-20182.8 KiB

main.goH A D21-Sep-2018104

README.md

1[![Build Status](https://travis-ci.org/magefile/mage.svg?branch=master)](https://travis-ci.org/magefile/mage) [![Build status](https://ci.appveyor.com/api/projects/status/n6h146y79xgxkidl/branch/master?svg=true)](https://ci.appveyor.com/project/natefinch/mage/branch/master)
2
3<p align="center"><img src="https://user-images.githubusercontent.com/3185864/32058716-5ee9b512-ba38-11e7-978a-287eb2a62743.png"/></p>
4
5## About
6
7Mage is a make/rake-like build tool using Go.  You write plain-old go functions,
8and Mage automatically uses them as Makefile-like runnable targets.
9
10## Installation
11
12Mage has no dependencies outside the Go standard library, and builds with Go 1.7
13and above (possibly even lower versions, but they're not regularly tested).
14
15Install mage by running
16
17```
18go get -u -d github.com/magefile/mage
19cd $GOPATH/src/github.com/magefile/mage
20go run bootstrap.go
21```
22
23This will download the code into your GOPATH, and then run the bootstrap script
24to build mage with version infomation embedded in it.  A normal `go get`
25(without -d) will build the binary correctly, but no version info will be
26embedded.  If you've done this, no worries, just go to
27$GOPATH/src/github.com/magefile/mage and run `mage install` or `go run
28bootstrap.go` and a new binary will be created with the correct version
29information.
30
31The mage binary will be created in your $GOPATH/bin directory.
32
33You may also install a binary release from our
34[releases](https://github.com/magefile/mage/releases) page.
35
36## Demo
37
38[![Mage Demo](https://img.youtube.com/vi/GOqbD0lF-iA/maxresdefault.jpg)](https://www.youtube.com/watch?v=GOqbD0lF-iA)
39
40## Discussion
41
42Join the `#mage` channel on [gophers slack](https://gophers.slack.com/messages/general/) for discussion of usage, development, etc.
43
44# Documentation
45
46see [magefile.org](https://magefile.org) for full docs
47
48see [godoc.org/github.com/magefile/mage/mage](https://godoc.org/github.com/magefile/mage/mage) for how to use mage as a library.
49
50# Why?
51
52Makefiles are hard to read and hard to write.  Mostly because makefiles are essentially fancy bash scripts with significant white space and additional make-related syntax.
53
54Mage lets you have multiple magefiles, name your magefiles whatever you
55want, and they're easy to customize for multiple operating systems.  Mage has no
56dependencies (aside from go) and runs just fine on all major operating systems, whereas make generally uses bash which is not well supported on Windows.
57Go is superior to bash for any non-trivial task involving branching, looping, anything that's not just straight line execution of commands.  And if your project is written in Go, why introduce another
58language as idiosyncratic as bash?  Why not use the language your contributors
59are already comfortable with?
60
61# TODO
62
63* File conversion tasks
64