github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/scripts/cmd/main.go (about) 1 package main 2 3 import ( 4 "os" 5 6 "github.com/0xPolygon/supernets2-node/log" 7 "github.com/urfave/cli/v2" 8 ) 9 10 const ( 11 flagInput = "input" 12 ) 13 14 func main() { 15 app := cli.NewApp() 16 app.Name = "supernets2-node-scripts" 17 app.Commands = []*cli.Command{ 18 { 19 Name: "updatedeps", 20 Usage: "Updates external dependencies like images, test vectors or proto files", 21 Action: updateDeps, 22 Flags: []cli.Flag{}, 23 }, 24 { 25 Name: "compilesc", 26 Usage: "Compiles smart contracts required for testing", 27 Action: compileSC, 28 Flags: []cli.Flag{ 29 &cli.StringFlag{ 30 Name: flagInput, 31 Aliases: []string{"in"}, 32 Usage: "Target path where the source solidity files are located. It can be a file or a directory, in which case the command will traverse all the descendants from it.", 33 Required: true, 34 }, 35 }, 36 }, 37 } 38 39 err := app.Run(os.Args) 40 if err != nil { 41 log.Fatal(err) 42 os.Exit(1) 43 } 44 }