Use consistent bash5 style for conditionals and quoting

This commit is contained in:
David Heinemeier Hansson
2026-02-21 10:18:47 +01:00
parent d2acf3b6ba
commit 7514ae7dcf
113 changed files with 289 additions and 287 deletions
+3 -3
View File
@@ -2,19 +2,19 @@
# 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
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
if [[ -z $current_tag ]]; then
echo "Error: Could not retrieve current tag."
exit 1
fi
if [[ "$current_tag" != "$latest_tag" ]]; then
if [[ $current_tag != $latest_tag ]]; then
echo "Omarchy update available ($latest_tag)"
exit 0
else