mirror of
https://github.com/strongdm/comply
synced 2024-11-14 20:04:53 +00:00
30 lines
608 B
Go
30 lines
608 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
"github.com/strongdm/comply/internal/render"
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var buildCommand = cli.Command{
|
|
Name: "build",
|
|
ShortName: "b",
|
|
Usage: "generate a static website summarizing the compliance program",
|
|
Flags: []cli.Flag{
|
|
cli.BoolFlag{
|
|
Name: "live, l",
|
|
Usage: "rebuild static site after filesystem changes",
|
|
},
|
|
},
|
|
Action: buildAction,
|
|
Before: beforeAll(dockerMustExist),
|
|
}
|
|
|
|
func buildAction(c *cli.Context) error {
|
|
err := render.Build("output", false)
|
|
if err != nil {
|
|
return errors.Wrap(err, "build failed")
|
|
}
|
|
return nil
|
|
}
|