-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add build tags * update builds to use new tags
- Loading branch information
1 parent
0f3a363
commit 2523ef8
Showing
8 changed files
with
85 additions
and
42 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -30,3 +30,4 @@ dist/ | |
|
||
# nex binaries | ||
nex/nex | ||
rootfs.ext4 |
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
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
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
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,36 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
|
||
nexnode "github.com/ConnectEverything/nex/internal/node" | ||
"github.com/choria-io/fisk" | ||
"github.com/sirupsen/logrus" | ||
) | ||
|
||
func init() { | ||
node_up := nodes.Command("up", "Starts a NEX node") | ||
node_up.Flag("config", "configuration file for the node").Default("./config.json").StringVar(&NodeOpts.Config) | ||
node_preflight := nodes.Command("preflight", "Checks system for node requirements and installs missing") | ||
node_preflight.Flag("force", "installs missing dependencies without prompt").Default("false").BoolVar(&NodeOpts.ForceDepInstall) | ||
node_preflight.Flag("config", "configuration file for the node").Default("./config.json").StringVar(&NodeOpts.Config) | ||
node_up.Action(RunNodeUp) | ||
node_preflight.Action(RunNodePreflight) | ||
|
||
} | ||
|
||
func RunNodeUp(ctx *fisk.ParseContext) error { | ||
log := logrus.New() | ||
ctxx, cancel := context.WithCancel(context.Background()) | ||
nexnode.CmdUp(Opts, NodeOpts, ctxx, cancel, log) | ||
<-ctxx.Done() | ||
return nil | ||
} | ||
|
||
func RunNodePreflight(ctx *fisk.ParseContext) error { | ||
log := logrus.New() | ||
ctxx, cancel := context.WithCancel(context.Background()) | ||
nexnode.CmdPreflight(Opts, NodeOpts, ctxx, cancel, log) | ||
|
||
return nil | ||
} |
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