diff options
Diffstat (limited to 'Omni/Ide/push.sh')
| -rwxr-xr-x | Omni/Ide/push.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Omni/Ide/push.sh b/Omni/Ide/push.sh index 25c0ed6..f6d67f4 100755 --- a/Omni/Ide/push.sh +++ b/Omni/Ide/push.sh @@ -77,22 +77,25 @@ service_deploy() { echo -e "${YLW}info: push: deploying service $service_name${NC}" - # 1. Build and cache (bild caches by default, outputs STORE_PATH=...) + # 1. Build and cache echo -e "${YLW}info: push: building $target${NC}" - local bild_output - bild_output=$(bild "$target" 2>&1) || { + if ! bild "$target"; then echo -e "${RED}fail: push: bild failed${NC}" - echo "$bild_output" exit 1 - } + fi + + # Get store path from symlink in _/nix/ + local symlink_path="${CODEROOT}/_/nix/${service_name}" + if [[ ! -L "$symlink_path" ]]; then + echo -e "${RED}fail: push: symlink not found: $symlink_path${NC}" + exit 1 + fi - # Extract store path from bild output local store_path - store_path=$(echo "$bild_output" | grep '^STORE_PATH=' | cut -d= -f2) + store_path=$(readlink "$symlink_path") if [[ -z "$store_path" ]]; then - echo -e "${RED}fail: push: could not extract store path from bild output${NC}" - echo "$bild_output" + echo -e "${RED}fail: push: could not read store path from symlink${NC}" exit 1 fi |
