supabase-operator/magefiles/build.go
Peter Kurfer 12090c913a
Some checks failed
E2E Tests / Run on Ubuntu (push) Failing after 20s
Lint / Run on Ubuntu (push) Failing after 3m45s
Tests / Run on Ubuntu (push) Failing after 16m8s
feat(db): prepare migrations and core CRD
2024-12-13 09:09:14 +01:00

31 lines
752 B
Go

package main
import (
"github.com/magefile/mage/mg" // mg contains helpful utility functions, like Deps
"golang.org/x/exp/slog"
)
// Default target to run when none is specified
// If not set, running mage will list available targets
// var Default = Build
// A build step that requires additional params, or platform specific steps for example
func Build() error {
mg.Deps(InstallDeps, InstallToolDeps)
slog.Info("Building...")
return Go("build", "-o", "bin/manager", "cmd/main.go")
}
func Run() error {
mg.Deps(InstallDeps, InstallToolDeps)
return Go("run", "./cmd/main.go")
}
func InstallToolDeps() error {
return Go("mod", "download", "-x", "-modfile=tools/go.mod")
}
func InstallDeps() error {
return Go("mod", "download", "-x")
}