summaryrefslogtreecommitdiff
path: root/magefile.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-02-27 14:20:48 -0700
committermo khan <mo@mokhan.ca>2025-02-27 14:20:48 -0700
commit705cab052d2f6fad3dc47b6bb42e891e03df2ab1 (patch)
treea914e015e7c1387fe852110bb1ee37994e58ebf7 /magefile.go
parent03136747dd80e8b9ded81a61e03e72e9c4beac11 (diff)
chore: add magefile to run multiple servers
Diffstat (limited to 'magefile.go')
-rw-r--r--magefile.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/magefile.go b/magefile.go
new file mode 100644
index 0000000..b092d74
--- /dev/null
+++ b/magefile.go
@@ -0,0 +1,30 @@
+//go:build mage
+// +build mage
+
+package main
+
+import (
+ "context"
+
+ "github.com/magefile/mage/mg"
+ "github.com/magefile/mage/sh"
+)
+
+// Default target to run when none is specified
+// If not set, running mage will list available targets
+var Default = Run
+
+// Run the Identity Provider
+func RunIdp() error {
+ return sh.RunV("ruby", "./bin/idp")
+}
+
+// Run the Service Provider
+func RunSp() error {
+ return sh.RunV("ruby", "./bin/sp")
+}
+
+// Run All the servers
+func Run(ctx context.Context) {
+ mg.CtxDeps(ctx, RunIdp, RunSp)
+}