cmd/nix-tool: remove unused internal commands
These are used for validation at the time of implementing these library functions.
This commit is contained in:
parent
0e4653332c
commit
9a210d9a7c
@ -108,45 +108,6 @@ func main() {
|
|||||||
Flag(&flagCacheScheme, "scheme", command.StringFlag("https"), "S3 scheme").
|
Flag(&flagCacheScheme, "scheme", command.StringFlag("https"), "S3 scheme").
|
||||||
Flag(&flagCacheCredPath, "credentials-path", command.StringFlag("env"), "Path to the s3 shared credentials file")
|
Flag(&flagCacheCredPath, "credentials-path", command.StringFlag("env"), "Path to the s3 shared credentials file")
|
||||||
|
|
||||||
c.Command("show", command.UsageInternal, func(args []string) error {
|
|
||||||
if len(args) < 1 {
|
|
||||||
return commandHandlerError("show requires at least 1 argument")
|
|
||||||
}
|
|
||||||
|
|
||||||
if drv, err := nix.DerivationShow(ctx, slices.Values(args)); err != nil {
|
|
||||||
return commandHandlerError(fmt.Sprintf("cannot show: %v", err))
|
|
||||||
} else {
|
|
||||||
log.Printf("got %d derivations:\n%#v", len(drv), drv)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
c.Command("build", command.UsageInternal, func(args []string) error {
|
|
||||||
if len(args) < 1 {
|
|
||||||
return commandHandlerError("build requires at least 1 argument")
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := nix.Build(ctx, slices.Values(args)); err != nil {
|
|
||||||
return commandHandlerError(fmt.Sprintf("cannot build: %v", err))
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
|
|
||||||
var (
|
|
||||||
flagSignKey string
|
|
||||||
)
|
|
||||||
c.NewCommand("sign", command.UsageInternal, func(args []string) error {
|
|
||||||
if len(args) < 1 {
|
|
||||||
return commandHandlerError("sign requires at least 1 argument")
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := nix.Sign(ctx, flagSignKey, slices.Values(args)); err != nil {
|
|
||||||
return commandHandlerError(fmt.Sprintf("cannot sign: %v", err))
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}).
|
|
||||||
Flag(&flagSignKey, "key", command.StringFlag("/var/lib/persist/cache/key"), "File containing the secret signing key")
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
resolveFlagOut string
|
resolveFlagOut string
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user