ビルド失敗時に GitHub Actions がエラーで止まるようにする - #1334
Open
m-tmatma wants to merge 1 commit into
Open
Conversation
m-tmatma
added a commit
to m-tmatma/teraterm
that referenced
this pull request
Jun 5, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
m-tmatma
added a commit
to m-tmatma/teraterm
that referenced
this pull request
Jun 5, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
release.bat の option 1〜6, 11〜14 において、各 call の後に if errorlevel 1 exit /b 1 を追加し、サブルーチンがエラーを返した 場合にスクリプトを即座に終了するようにした。 buildall.bat が失敗した場合に exit /b 1 で返すようにした。 これまでは常に exit /b 0 を返していたため、libs のビルド失敗が 上位スクリプトに伝播しなかった。 create_package.bat の各コマンドにもエラーチェックを追加した。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
m-tmatma
force-pushed
the
fix/issue-1092-release-bat-errorlevel
branch
from
August 4, 2026 09:58
670d00e to
33a653a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
issue #1092 への対応。
installer/release.batにおいてサブルーチンの呼び出し後にエラーチェックが行われていなかったため、ビルドが失敗しても GitHub Actions が正常終了してしまう問題を修正する。変更内容
installer/release.batcallの直後にif errorlevel 1 exit /b 1を追加:download_libs,:build_libs,:build_teraterm,:build_teraterm_1,:build_teraterm_2)が失敗した場合にスクリプトを即座に終了するようにした:build_libsサブルーチンにエラー伝播を追加buildall.batが失敗した場合にexit /b 1を返すようにした(これまでは常にexit /b 0を返していた)installer/create_package.batcmake -E copy_directory,%INNO_SETUP%,cmake -E tar,cmake -E sha256sum,cmake -E sha512sum)の直後にエラーチェックを追加pushd Outputブロック内でエラーが発生した場合はpopdしてからexit /b 1するようにしたexit /b 0を追加(これまでは最後のコマンドの終了コードがそのまま返っていた)テスト結果
コミットを1つにsquashし、最新の main にリベースした状態(コミット
33a653af1)で再検証済み。各ケースをそれぞれ独立したブランチにcherry-pickして並行実行し、いずれも想定通りの箇所で停止することを確認した。build_common.batにexit /b 1を追加 →:build_teraterm_1失敗teraterm.cppに#errorを追加 → コンパイルエラーbuildall.batにexit /b 1を追加 →:build_libs失敗teraterm.issに#errorを追加 →create_package.bat失敗検証に使用したブランチは確認後に削除済み。