summaryrefslogtreecommitdiff
path: root/magefile.go
diff options
context:
space:
mode:
Diffstat (limited to 'magefile.go')
-rw-r--r--magefile.go55
1 files changed, 0 insertions, 55 deletions
diff --git a/magefile.go b/magefile.go
deleted file mode 100644
index 49cd4c87..00000000
--- a/magefile.go
+++ /dev/null
@@ -1,55 +0,0 @@
-//go:build mage
-// +build mage
-
-package main
-
-import (
- "context"
- "path/filepath"
-
- "github.com/magefile/mage/mg"
- "github.com/magefile/mage/sh"
- "github.com/xlgmokha/x/pkg/x"
-)
-
-// Default target to run when none is specified
-// If not set, running mage will list available targets
-var Default = Servers
-
-// Run the Authzd Service
-func Authzd() error {
- env := map[string]string{
- "BIND_ADDR": ":8080",
- }
- return sh.RunWithV(env, "go", "run", "./cmd/authzd/main.go")
-}
-
-// Generate gRPC from protocal buffers
-func Protos() error {
- for _, file := range x.Must(filepath.Glob("./protos/*.proto")) {
- if err := sh.RunV(
- "protoc",
- "--proto_path=./protos",
- "--go_out=.",
- "--twirp_out=.",
- file,
- ); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// Run All the servers
-func Servers(ctx context.Context) {
- mg.CtxDeps(ctx, Authzd)
-}
-
-// Run the end to end tests
-func Test(ctx context.Context) error {
- mg.CtxDeps(ctx, func() error {
- return sh.RunV("go", "clean", "-testcache")
- })
- return sh.RunV("go", "test", "-shuffle=on", "-v", "./...")
-}