An open API service indexing awesome lists of open source software.

https://github.com/plimble/mage

Mage helper
https://github.com/plimble/mage

Last synced: 7 months ago
JSON representation

Mage helper

Awesome Lists containing this project

README

          

# Mage helper

## Installation

```sh
go get -u github.com/plimble/mage/...
$GOPATH/src/github.com/plimble/mage/install
```

## Example

```go
// +build mage

package main

import (
"fmt"

"github.com/plimble/mage/mg"
)

type Build mg.Namespace

func (Build) Linux() {
mg.BuildLinux(".", "./bin/app-linux")
fmt.Println("Build Done")
}

func (Build) Mac() {
mg.BuildMac(".", "./bin/app-mac")
fmt.Println("Build Done")
}

func (Build) All() {
Build{}.Linux()
Build{}.Mac()
fmt.Println("Build Done")
}

func Version() {
mg.Exec("go version")
}
```

Run

```sh
mage build:linux
mage build:mac
mage build:all
mage version
```