https://github.com/plimble/mage
Mage helper
https://github.com/plimble/mage
Last synced: 7 months ago
JSON representation
Mage helper
- Host: GitHub
- URL: https://github.com/plimble/mage
- Owner: plimble
- License: mit
- Created: 2019-02-14T20:13:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-19T10:22:05.000Z (almost 7 years ago)
- Last Synced: 2024-04-16T00:14:51.406Z (over 2 years ago)
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```