Build with Magefile #104341
5
Makefile
5
Makefile
@ -49,9 +49,8 @@ export CGO_ENABLED=0
|
||||
all: application
|
||||
|
||||
# Install generators and build the software.
|
||||
with-deps:
|
||||
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.9.0
|
||||
go install github.com/golang/mock/mockgen@v1.6.0
|
||||
with-deps: buildtool
|
||||
"${BUILDTOOL_PATH}" installGenerators
|
||||
$(MAKE) application
|
||||
|
||||
vet: buildtool
|
||||
|
@ -18,12 +18,27 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
generators = []string{
|
||||
"github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.9.0",
|
||||
"github.com/golang/mock/mockgen@v1.6.0",
|
||||
}
|
||||
|
||||
// The directory that will contain the built webapp files, and some other
|
||||
// files that will be served as static files by the Flamenco Manager web
|
||||
// server.
|
||||
webStatic = filepath.Join("web", "static")
|
||||
)
|
||||
|
||||
// Install code generators.
|
||||
func InstallGenerators() error {
|
||||
for _, pkg := range generators {
|
||||
if err := sh.RunV(mg.GoCmd(), "install", pkg); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build Flamenco Manager and Flamenco Worker, including the webapp and the add-on
|
||||
func Build() {
|
||||
mg.Deps(FlamencoManager, FlamencoWorker)
|
||||
|
Loading…
Reference in New Issue
Block a user