Skip to content

Commit f95920e

Browse files
Move up magefile for easier access (#55)
1 parent a21eb71 commit f95920e

File tree

2 files changed

+35
-22
lines changed

2 files changed

+35
-22
lines changed

arc/magefile.go

Lines changed: 0 additions & 22 deletions
This file was deleted.

magefile.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//go:build mage
2+
// +build mage
3+
4+
package main
5+
6+
import (
7+
"github.com/magefile/mage/sh"
8+
)
9+
10+
// Install Arc by building a binary from the current source and placing it in
11+
// the Go PATH
12+
func Install() error {
13+
14+
if err := sh.Run("go", "mod", "download"); err != nil {
15+
return err
16+
}
17+
18+
return sh.Run("go", "install", "./arc")
19+
}
20+
21+
// Remove the Arc binary created from the Install command
22+
func Remove() error {
23+
24+
return sh.Run("go", "clean", "-i", "github.com/hubci/arc/arc")
25+
}
26+
27+
func Test() error {
28+
29+
return sh.Run("gotestsum", "./...")
30+
}
31+
32+
func TestCI() error {
33+
34+
return sh.Run("gotestsum", "--junitfile=junit/unit-tests.xml", "--", "-coverprofile=coverage.txt", "-covermode=atomic", "./...")
35+
}

0 commit comments

Comments
 (0)