mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
* Add omarchy CLI * Remove outdated or internal * Add bash completions for command * Add omarchy command documentation * Add missing docs * Correct to what's now right * Fix tests --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
25 lines
658 B
Bash
Executable File
25 lines
658 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Get remote tag
|
|
|
|
latest_tag=$(git -C "$OMARCHY_PATH" ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1)
|
|
if [[ -z $latest_tag ]]; then
|
|
echo "Error: Could not retrieve latest tag."
|
|
exit 1
|
|
fi
|
|
|
|
# Get local tag
|
|
current_tag=$(git -C "$OMARCHY_PATH" describe --tags $(git -C "$OMARCHY_PATH" rev-list --tags --max-count=1))
|
|
if [[ -z $current_tag ]]; then
|
|
echo "Error: Could not retrieve current tag."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $current_tag != $latest_tag ]]; then
|
|
echo "Omarchy update available ($latest_tag)"
|
|
exit 0
|
|
else
|
|
echo "Omarchy is up to date ($current_tag)"
|
|
exit 1
|
|
fi
|