supabase-operator/magefiles/commands.go
Peter Kurfer 647f602c79
Some checks failed
Lint / Run on Ubuntu (push) Failing after 2m58s
E2E Tests / Run on Ubuntu (push) Failing after 4m18s
Tests / Run on Ubuntu (push) Failing after 2m39s
feat: basic functionality implemented
- added Core CRD to manage DB migrations & configuration, PostgREST and
  GoTrue (auth)
- added APIGateway CRD to manage Envoy proxy
- added Dashboard CRD to manage (so far) pg-meta and (soon) studio
  deployments
- implemented basic Envoy control plane based on K8s watcher
2025-01-04 17:07:49 +01:00

35 lines
909 B
Go

package main
import (
"github.com/magefile/mage/sh"
)
type command string
var (
ControllerGen = command("controller-gen")
Gofumpt = command("gofumpt")
GolangciLint = command("golangci-lint")
Sqlc = command("sqlc")
CRDRefDocs = command("crd-ref-docs")
)
var tools map[command]string = map[command]string{
ControllerGen: "sigs.k8s.io/controller-tools/cmd/controller-gen",
Gofumpt: "mvdan.cc/gofumpt",
GolangciLint: "github.com/golangci/golangci-lint/cmd/golangci-lint",
Sqlc: "github.com/sqlc-dev/sqlc/cmd/sqlc",
CRDRefDocs: "github.com/elastic/crd-ref-docs",
}
var (
Go = sh.RunCmd("go")
Git = sh.RunCmd("git")
RunTool = RunVCmd("go", "run", "-modfile=tools/go.mod")
)
func RunVCmd(cmd string, primaryArgs ...string) func(args ...string) error {
return func(args ...string) error {
return sh.RunV(cmd, append(primaryArgs, args...)...)
}
}