diff --git a/README.md b/README.md index 6bda25f..1afddad 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ to run - sluice builds the image and runs it. ## Install ```bash -curl -fsSL https://raw.githubusercontent.com/Pyronewbic/Sluice/main/install.sh | sh +brew install Pyronewbic/tap/sluice +# or: curl -fsSL https://raw.githubusercontent.com/Pyronewbic/Sluice/main/install.sh | sh # or, from a checkout: ./install.sh ``` -Symlinks `bin/sluice` into `~/.local/bin` (ensure it's on `PATH`). Needs **docker** or -**podman** to build and run (`sluice init` needs neither). (A Homebrew tap is coming - see -[`packaging/`](packaging/).) +The installer symlinks `bin/sluice` into `~/.local/bin` (ensure it's on `PATH`). Needs +**docker** or **podman** to build and run (`sluice init` needs neither). ## Use diff --git a/bin/sluice b/bin/sluice index 8644a01..6ed85d2 100755 --- a/bin/sluice +++ b/bin/sluice @@ -30,10 +30,10 @@ CORE="$ROOT/core" die() { echo "[sluice] $*" >&2; exit 1; } # --- version + help ------------------------------------------------------------ -SLUICE_VERSION="0.1.0" # fallback when not a git checkout -sluice_version() { # git tag if available, else the baked constant +SLUICE_VERSION="0.1.1" # fallback when not a git checkout +sluice_version() { # git tag if $ROOT is our own checkout, else the baked constant local v - if v="$(git -C "$ROOT" describe --tags --always --dirty 2>/dev/null)" && [ -n "$v" ]; then + if [ -e "$ROOT/.git" ] && v="$(git -C "$ROOT" describe --tags --always --dirty 2>/dev/null)" && [ -n "$v" ]; then printf '%s' "${v#v}" else printf '%s' "$SLUICE_VERSION" diff --git a/packaging/homebrew/sluice.rb b/packaging/homebrew/sluice.rb index 861cc60..1e02ab1 100644 --- a/packaging/homebrew/sluice.rb +++ b/packaging/homebrew/sluice.rb @@ -7,8 +7,9 @@ class Sluice < Formula desc "Sandboxed, egress-firewalled container runner for projects and coding agents" homepage "https://github.com/Pyronewbic/Sluice" - url "https://github.com/Pyronewbic/Sluice/archive/refs/tags/v0.1.0.tar.gz" - sha256 "0000000000000000000000000000000000000000000000000000000000000000" # TODO: fill at release + # Template; the live, sha-pinned formula is in the tap (github.com/Pyronewbic/homebrew-tap). + url "https://github.com/Pyronewbic/Sluice/archive/refs/tags/v0.1.1.tar.gz" + sha256 "0000000000000000000000000000000000000000000000000000000000000000" # set in the tap at release license "Apache-2.0" # Runtime needs docker or podman, which Homebrew shouldn't manage - documented, not a dep.