plimble / mage

Mage helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mage helper

Installation

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

Example

// +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

mage build:linux
mage build:mac
mage build:all
mage version

About

Mage helper

License:MIT License


Languages

Language:Go 100.0%