Merge pull request #12 from lucasrguerra/chore/superset-config

Superset: setup, teardown and run scripts for workspaces
This commit is contained in:
Lucas Rayan Guerra authored and GitHub committed 2026-10-20 10:10:22 -03:00
commit c49c9e36bd
4 files changed
+34

No files matched your search

+4
View File
@@ -6,6 +6,10 @@
.claude/
CLAUDE.md
# Variáveis de ambiente locais (o setup do Superset copia da raiz)
.env
.env.*
# Build
target/
node_modules/
+5
View File
@@ -0,0 +1,5 @@
{
"setup": ["./.superset/setup.sh"],
"teardown": ["./.superset/teardown.sh"],
"run": ["cargo run -p guara-cli -- ui --no-open"]
}
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Runs once when a Superset workspace (git worktree) is created. Safe to run again.
set -euo pipefail
# Local files that are not tracked by git but that a new worktree needs.
# Nothing is overwritten if it already exists in the workspace.
if [ -n "${SUPERSET_ROOT_PATH:-}" ] && [ -d "$SUPERSET_ROOT_PATH" ]; then
for f in "$SUPERSET_ROOT_PATH"/.env "$SUPERSET_ROOT_PATH"/.env.* "$SUPERSET_ROOT_PATH"/CLAUDE.md; do
[ -f "$f" ] || continue
dest="./$(basename "$f")"
[ -e "$dest" ] || cp "$f" "$dest"
done
fi
# Download the crates now so the first build and the first test run do not wait on the network.
cargo fetch --locked
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Runs when a Superset workspace is deleted.
# Setup starts no background service. The only long-running process is the Run command
# (`guara ui`), which this workspace builds into its own target/ directory, so stop any
# copy that is still alive before the worktree is removed.
set -uo pipefail
pkill -f -- "$PWD/target/.*/guara ui" 2>/dev/null || true
exit 0