Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
build: added option to run mage without installing it
Browse files Browse the repository at this point in the history
  • Loading branch information
g1ntas committed Jul 14, 2020
1 parent 6a332d6 commit d02dd5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ os:

install:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0
- go get github.com/magefile/mage

script:
- go mod download
- go mod verify
- mage -v check
- go run mage.go -v check

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ To build a binary from the source code, you need to have [Go](https://golang.org

**Steps**:
1. Clone repository: `git clone https://github.com/g1ntas/accio`
2. Build: `go build`
2. Build: `go run mage.go build`
3. Run `./accio` to verify if it works

**NOTE**:
While it’s the easiest way to build a binary, it doesn’t include any versioning information. For best results, use [Mage](https://magefile.org/) with `mage build`.

## Quickstart
### Running generator
You can run a generator from a local directory with `run` command:
Expand Down
12 changes: 12 additions & 0 deletions mage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// +build ignore

package main

import (
"github.com/magefile/mage/mage"
"os"
)

func main() {
os.Exit(mage.Main())
}

0 comments on commit d02dd5e

Please sign in to comment.