main の更新ごとに app.jar を配布しスクリプトを自己更新する - #51
Merged
Merged
Conversation
- 時刻同期後に fake-hwclock へ保存し、RTC のない Raspberry Pi で 再起動時に時刻が巻き戻るのを防ぐ - 選択商品のバーコード PDF もキャッシュ対象にし、枠線あり版も 起動時にウォームアップ。商品の追加・更新・削除をイベントで受けて キャッシュを作り直す - Danger Zone のパスワード照合に接続元ごとのレート制限を追加。 連続失敗が上限に達している間は照合せず 429 と Retry-After を返す
update-app.sh の最後で upload-apk.sh を呼び、jar が同一バージョンで 早期終了する場合も APK の確認だけは行う。 APK の登録に失敗してもサーバーの更新は成功扱いにし、警告のみ出す。 オフライン更新(jar のパス指定)と --skip-apk 指定時は確認しない。
- main への push で app.jar と kidspos-scripts.tar.gz を添付した server-v* リリースを自動作成する Release Server ワークフローを追加 - app.jar の配布元を一本化するため generate-sdk.yml からは app.jar を外す - update-app.sh がリリース同梱のスクリプトで自身と doctor.sh、upload-apk.sh を差し替えるようにする(--skip-self-update で無効化可能) - 自己更新のテスト 11 件を追加(計 104 assertions) - releases/latest/download/app.jar が使えなくなるためオフライン手順を releases API 経由に変更
Contributor
🎨 Visual Regression Test Results✅ All visual regression tests passed! All page screenshots match the expected baselines. 📊 Test Coverage
|
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.
背景
Raspberry Pi の update-app.sh が取得していた app.jar は、api.yaml が変更されたときだけ発火するワークフローで作られていたため、main の最新コードとは限りませんでした。またラズパイ側スクリプト自体を更新する仕組みがありませんでした。
変更内容
タグについて
ローリングタグは使えません。update-app.sh は tag_name と .installed-version の一致で更新をスキップするため、タグが不変だと二度と更新されなくなります。server-v{version}.{run_number} のユニークタグにしています。
テスト
注意
このリリースワークフローはマージ後の main への push で初めて発火します。自己更新はスクリプトが配置された次の実行から効くため、初回だけは install.sh の再実行かスクリプトの手動配置が必要です。
Generated by Claude Code