forked from Snowfork/snowbridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
magefile.go
37 lines (30 loc) · 871 Bytes
/
magefile.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//go:build mage
// +build mage
package main
import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"
)
func Build() {
mg.Deps(BuildMain)
}
func BuildMain() error {
err := sh.Run("sszgen", "--path", "relays/beacon/state", "--objs", "BeaconStateCapellaMainnet,BlockRootsContainerMainnet,TransactionsRootContainer,BeaconBlockCapellaMainnet,WithdrawalsRootContainerMainnet,BeaconStateDenebMainnet,BeaconBlockDenebMainnet")
if err != nil {
return err
}
err = sh.Run("go", "generate", "./...")
if err != nil {
return err
}
return sh.Run("go", "build", "-o", "build/snowbridge-relay", "main.go")
}
func Test() error {
return sh.RunV("go", "test", "./...")
}
func Lint() error {
return sh.Run("revive", "-config", "revive.toml", "./...")
}
func Install() error {
return sh.Run("go", "build", "-o", "$GOPATH/bin/snowbridge-relay", "main.go")
}