The edge channel installs omarchy-dev, but omarchy-version only queried omarchy, so it exited 1 there. omarchy-snapshot runs under set -e, so the failed lookup aborted the whole update over a snapshot label. It only worked at all because omarchy-dev declares provides=(omarchy) from the installer repo. Builds without it fail, so check both packages here instead of relying on a declaration from another tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
29 lines
630 B
Bash
Executable File
29 lines
630 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Print the installed Omarchy version
|
|
|
|
omarchy_path=${OMARCHY_PATH:-/usr/share/omarchy}
|
|
omarchy_path=${omarchy_path%/}
|
|
|
|
if [[ $omarchy_path != "/usr/share/omarchy" ]]; then
|
|
hash=$(git -C "$omarchy_path" rev-parse --short HEAD 2>/dev/null || true)
|
|
|
|
if [[ -n $hash ]]; then
|
|
echo "dev ($hash)"
|
|
else
|
|
echo "dev"
|
|
fi
|
|
|
|
exit 0
|
|
fi
|
|
|
|
# The edge channel installs omarchy-dev instead of omarchy, so check both.
|
|
for package in omarchy-dev omarchy; do
|
|
version=$(pacman -Q "$package" 2>/dev/null | awk '{ print $2 }')
|
|
[[ -n $version ]] && break
|
|
done
|
|
|
|
[[ -n $version ]] || exit 1
|
|
|
|
echo "$version"
|