Build with Magefile #104341
5
Makefile
5
Makefile
@ -49,9 +49,8 @@ export CGO_ENABLED=0
|
|||||||
all: application
|
all: application
|
||||||
|
|
||||||
# Install generators and build the software.
|
# Install generators and build the software.
|
||||||
with-deps:
|
with-deps: buildtool
|
||||||
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.9.0
|
"${BUILDTOOL_PATH}" installGenerators
|
||||||
go install github.com/golang/mock/mockgen@v1.6.0
|
|
||||||
$(MAKE) application
|
$(MAKE) application
|
||||||
|
|
||||||
vet: buildtool
|
vet: buildtool
|
||||||
|
@ -18,12 +18,27 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
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
|
// 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
|
// files that will be served as static files by the Flamenco Manager web
|
||||||
// server.
|
// server.
|
||||||
webStatic = filepath.Join("web", "static")
|
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
|
// Build Flamenco Manager and Flamenco Worker, including the webapp and the add-on
|
||||||
func Build() {
|
func Build() {
|
||||||
mg.Deps(FlamencoManager, FlamencoWorker)
|
mg.Deps(FlamencoManager, FlamencoWorker)
|
||||||
|
Loading…
Reference in New Issue
Block a user