summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-08-14 11:54:52 -0600
committermo khan <mo@mokhan.ca>2025-08-14 11:54:52 -0600
commit0b7103e850232eaab4e87a0322817055e55dbe51 (patch)
tree3a55344b8c589f52687200c0beb5cd92688014fa /bin
parent3f228b16c758d377566f11d2d328d1ccf658a2ad (diff)
parent9e55e65ac5eb6ff645880ee253a33f6ab138b615 (diff)
Merge branch 'fix-build' into 'main'
Fix the broken build by running pg as a separate container. See merge request gitlab-org/software-supply-chain-security/authorization/sparkled!24 Improve shell scripts and remove /sparkles/restore endpoint - Add error handling and debugging to shell scripts with `set -e` and `DEBUG` flag - Ensure scripts run from project root with `cd "$(dirname "$0")/.."` - Remove `/sparkles/restore` endpoint from public routes and Envoy config - Add Postgres test container support for integration tests - Update CI configuration with newer Runway version and improved test setup - Simplify Makefile by removing redundant commands ------- :robot: Commit message generated by GitLab Duo
Diffstat (limited to 'bin')
-rwxr-xr-xbin/postgres5
-rwxr-xr-xbin/spicedb5
-rwxr-xr-xbin/tool3
-rwxr-xr-xbin/zed12
4 files changed, 24 insertions, 1 deletions
diff --git a/bin/postgres b/bin/postgres
index 66c0ab0..7e1bb7c 100755
--- a/bin/postgres
+++ b/bin/postgres
@@ -1,5 +1,10 @@
#!/bin/sh
+set -e
+[ -n "$DEBUG" ] && set -x
+
+cd "$(dirname "$0")/.."
+
if ! command -v postgres >/dev/null 2>&1; then
echo "Install postgres via mise: mise install postgres"
exit 1
diff --git a/bin/spicedb b/bin/spicedb
index 5d4cf0b..726cc9f 100755
--- a/bin/spicedb
+++ b/bin/spicedb
@@ -1,5 +1,10 @@
#!/bin/sh
+set -e
+[ -n "$DEBUG" ] && set -x
+
+cd "$(dirname "$0")/.."
+
if ! command -v spicedb >/dev/null 2>&1; then
echo "Install spicedb: https://authzed.com/docs/spicedb/getting-started/installing-spicedb"
exit 1
diff --git a/bin/tool b/bin/tool
index 7b46bce..2a2bd80 100755
--- a/bin/tool
+++ b/bin/tool
@@ -1,6 +1,9 @@
#!/bin/sh
set -e
+[ -n "$DEBUG" ] && set -x
+
+cd "$(dirname "$0")/.."
tool_bin=$(go tool -n "$1")
diff --git a/bin/zed b/bin/zed
index 77dc0d8..fbe7834 100755
--- a/bin/zed
+++ b/bin/zed
@@ -1,3 +1,13 @@
#!/bin/sh
-go tool godotenv -f .env.local,.env go tool zed --insecure $@
+set -e
+[ -n "$DEBUG" ] && set -x
+
+cd "$(dirname "$0")/.."
+
+if ! command -v zed >/dev/null 2>&1; then
+ echo "Install zed: https://github.com/authzed/zed"
+ exit 1
+fi
+
+./bin/tool godotenv -f .env.local,.env go tool zed --insecure $@