From 4e136ded68d59b3df464d9a728e88de7a42f6e29 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 11 Aug 2025 21:33:04 +0200 Subject: [PATCH] We now have a global $OMARCHY_PATH --- bin/omarchy-update-available | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/omarchy-update-available b/bin/omarchy-update-available index 3eb20a03..808513e8 100755 --- a/bin/omarchy-update-available +++ b/bin/omarchy-update-available @@ -1,15 +1,13 @@ #!/bin/bash -omarchy_path="$HOME/.local/share/omarchy" - # Ensure remote is reachable -if ! git -C "$omarchy_path" ls-remote &>/dev/null; then +if ! git -C "$OMARCHY_PATH" ls-remote &>/dev/null; then echo "Error: Unable to reach remote repository." exit 1 fi -latest_tag=$(git -C "$omarchy_path" ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1) -current_tag=$(git -C "$omarchy_path" describe --tags $(git -C "$omarchy_path" rev-list --tags --max-count=1)) +latest_tag=$(git -C "$OMARCHY_PATH" ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1) +current_tag=$(git -C "$OMARCHY_PATH" describe --tags $(git -C "$OMARCHY_PATH" rev-list --tags --max-count=1)) if [[ "$current_tag" != "$latest_tag" ]]; then echo "Omarchy update available ($latest_tag)"