mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-05-28 18:43:40 +00:00
chore(style): normalize indentation and line continuations in shell scripts
Apply consistent 4-space indentation and trailing-operator style for line continuations (&&, |) across all development and release scripts. No logic changes. Release-Notes: skip
This commit is contained in:
parent
a93ad1ac96
commit
e163a47d57
9 changed files with 110 additions and 112 deletions
|
|
@ -51,9 +51,9 @@ if grep -q '^\[alias\]' ~/.gitconfig.host; then
|
||||||
|
|
||||||
# First, collect all aliases from host config
|
# First, collect all aliases from host config
|
||||||
TEMP_ALIASES=$(mktemp)
|
TEMP_ALIASES=$(mktemp)
|
||||||
sed -n '/^\[alias\]/,/^\[/p' ~/.gitconfig.host | \
|
sed -n '/^\[alias\]/,/^\[/p' ~/.gitconfig.host |
|
||||||
grep -v '^\[' | \
|
grep -v '^\[' |
|
||||||
grep -v '^$' | \
|
grep -v '^$' |
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
# Skip aliases with macOS-specific paths
|
# Skip aliases with macOS-specific paths
|
||||||
if echo "$line" | grep -q -E '/(Applications|usr/local)'; then
|
if echo "$line" | grep -q -E '/(Applications|usr/local)'; then
|
||||||
|
|
|
||||||
|
|
@ -168,8 +168,8 @@ build_diff_context() {
|
||||||
if ! diff_context=$(
|
if ! diff_context=$(
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
git diff --unified=0 --no-color --minimal --patience --diff-filter=AM \
|
git diff --unified=0 --no-color --minimal --patience --diff-filter=AM \
|
||||||
"${FROM_TAG}..${TO_TAG}" -- "${USER_FACING_PATHS[@]}" 2>/dev/null \
|
"${FROM_TAG}..${TO_TAG}" -- "${USER_FACING_PATHS[@]}" 2>/dev/null |
|
||||||
| awk '
|
awk '
|
||||||
/^diff --git / { print; next }
|
/^diff --git / { print; next }
|
||||||
/^--- / || /^\+\+\+ / || /^@@ / { print; next }
|
/^--- / || /^\+\+\+ / || /^@@ / { print; next }
|
||||||
/^[+-]/ {
|
/^[+-]/ {
|
||||||
|
|
@ -177,18 +177,18 @@ build_diff_context() {
|
||||||
print
|
print
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
' \
|
' |
|
||||||
| head -c "$RELEASE_NOTES_DIFF_MAX_BYTES"
|
head -c "$RELEASE_NOTES_DIFF_MAX_BYTES"
|
||||||
); then
|
); then
|
||||||
log_info "${YELLOW}Warning: compact diff generation failed, falling back to legacy diff context${NC}"
|
log_info "${YELLOW}Warning: compact diff generation failed, falling back to legacy diff context${NC}"
|
||||||
diff_context=$(git diff --unified=2 --diff-filter=AM \
|
diff_context=$(git diff --unified=2 --diff-filter=AM \
|
||||||
"${FROM_TAG}..${TO_TAG}" -- "${USER_FACING_PATHS[@]}" 2>/dev/null \
|
"${FROM_TAG}..${TO_TAG}" -- "${USER_FACING_PATHS[@]}" 2>/dev/null |
|
||||||
| head -c "$RELEASE_NOTES_DIFF_MAX_BYTES" || true)
|
head -c "$RELEASE_NOTES_DIFF_MAX_BYTES" || true)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
diff_context=$(git diff --unified=2 --diff-filter=AM \
|
diff_context=$(git diff --unified=2 --diff-filter=AM \
|
||||||
"${FROM_TAG}..${TO_TAG}" -- "${USER_FACING_PATHS[@]}" 2>/dev/null \
|
"${FROM_TAG}..${TO_TAG}" -- "${USER_FACING_PATHS[@]}" 2>/dev/null |
|
||||||
| head -c "$RELEASE_NOTES_DIFF_MAX_BYTES" || true)
|
head -c "$RELEASE_NOTES_DIFF_MAX_BYTES" || true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$diff_context"
|
echo "$diff_context"
|
||||||
|
|
@ -264,8 +264,8 @@ generate_with_copilot() {
|
||||||
FINAL_FILE_CHANGES=$(git diff --name-status "${FROM_TAG}..${TO_TAG}" 2>/dev/null || true)
|
FINAL_FILE_CHANGES=$(git diff --name-status "${FROM_TAG}..${TO_TAG}" 2>/dev/null || true)
|
||||||
|
|
||||||
# Revert commits are useful chronology hints (earlier changes may be superseded).
|
# Revert commits are useful chronology hints (earlier changes may be superseded).
|
||||||
REVERT_COMMITS=$(git log --reverse --pretty=format:"%h | %s" "${FROM_TAG}..${TO_TAG}" \
|
REVERT_COMMITS=$(git log --reverse --pretty=format:"%h | %s" "${FROM_TAG}..${TO_TAG}" |
|
||||||
| grep -Ei '\|[[:space:]]*revert\b' || true)
|
grep -Ei '\|[[:space:]]*revert\b' || true)
|
||||||
|
|
||||||
if [[ -z $FINAL_FILE_CHANGES ]]; then
|
if [[ -z $FINAL_FILE_CHANGES ]]; then
|
||||||
FINAL_FILE_CHANGES="(none)"
|
FINAL_FILE_CHANGES="(none)"
|
||||||
|
|
@ -734,10 +734,8 @@ generate_with_manual() {
|
||||||
deps)
|
deps)
|
||||||
echo "$LINE" >>"$DEPS_FILE"
|
echo "$LINE" >>"$DEPS_FILE"
|
||||||
;;
|
;;
|
||||||
skip)
|
skip) ;;
|
||||||
;;
|
*) ;;
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ fi
|
||||||
# Download and extract HACS (stable release ZIP)
|
# Download and extract HACS (stable release ZIP)
|
||||||
cd config/custom_components
|
cd config/custom_components
|
||||||
log_step "Downloading HACS"
|
log_step "Downloading HACS"
|
||||||
if wget -q https://github.com/hacs/integration/releases/latest/download/hacs.zip && \
|
if wget -q https://github.com/hacs/integration/releases/latest/download/hacs.zip &&
|
||||||
unzip -q hacs.zip -d hacs && \
|
unzip -q hacs.zip -d hacs &&
|
||||||
rm hacs.zip; then
|
rm hacs.zip; then
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue