소스 검색

fix: reject multiline release tags and say only successful toggles flip state

- A manually entered tag with a newline could match one valid line in the
  tag list and then never stop the loop. Tags with a newline are now
  rejected.
- The single button toggle page now says each successful execution flips
  the state, since a failed hardware command leaves it unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread 15 시간 전
부모
커밋
d9256b6300
2개의 변경된 파일과 2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      .github/workflows/release-upgrade-notes.yml
  2. 1 1
      docs/modules/ROOT/pages/solutions/single-button-toggle/index.adoc

+ 1 - 1
.github/workflows/release-upgrade-notes.yml

@@ -50,7 +50,7 @@ jobs:
         run: |
           released_notes="${RUNNER_TEMP}/upgrade_notes_released.adoc"
           release_tags="$(git tag -l '3*.*.*' | grep -v -e '-' | sort -V)"
-          if ! grep -qxF -- "${RELEASE_TAG}" <<< "${release_tags}"; then
+          if [[ "${RELEASE_TAG}" == *$'\n'* ]] || ! grep -qxF -- "${RELEASE_TAG}" <<< "${release_tags}"; then
             echo "Tag ${RELEASE_TAG} does not exist or is not a stable 3k release tag."
             exit 1
           fi

+ 1 - 1
docs/modules/ROOT/pages/solutions/single-button-toggle/index.adoc

@@ -3,7 +3,7 @@
 
 A single button toggle controls something that has two states, using just one action. Each press flips the state (unless the action is still running from a previous press, see <<how-it-works>>), and the button's icon changes to show the current state - a "closed" icon when the state is `closed`, and an "open" icon when the state is `open`.
 
-Unlike the xref:solutions/latching-toggle/index.adoc[Latching Toggle], which uses two interlocked actions, the button here is never disabled. It can always be pressed, and each completed execution does the opposite of the current state.
+Unlike the xref:solutions/latching-toggle/index.adoc[Latching Toggle], which uses two interlocked actions, the button here is never disabled. It can always be pressed, and each successful execution changes the state to the opposite of the current state.
 
 In OliveTin, the state is stored in an xref:entities/intro.adoc[entity file], which the action updates itself, and the icon is chosen with an xref:action_customization/icons.adoc[image icon] whose file name comes from the entity's state.