-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move up magefile for easier access (#55)
- Loading branch information
1 parent
a21eb71
commit f95920e
Showing
2 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//go:build mage | ||
// +build mage | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/magefile/mage/sh" | ||
) | ||
|
||
// Install Arc by building a binary from the current source and placing it in | ||
// the Go PATH | ||
func Install() error { | ||
|
||
if err := sh.Run("go", "mod", "download"); err != nil { | ||
return err | ||
} | ||
|
||
return sh.Run("go", "install", "./arc") | ||
} | ||
|
||
// Remove the Arc binary created from the Install command | ||
func Remove() error { | ||
|
||
return sh.Run("go", "clean", "-i", "github.com/hubci/arc/arc") | ||
} | ||
|
||
func Test() error { | ||
|
||
return sh.Run("gotestsum", "./...") | ||
} | ||
|
||
func TestCI() error { | ||
|
||
return sh.Run("gotestsum", "--junitfile=junit/unit-tests.xml", "--", "-coverprofile=coverage.txt", "-covermode=atomic", "./...") | ||
} |