Skip to content

ci: version.json の commit-back を廃止しビルド時に焼き込む (backport of #136, aicshud/WHEEL#1014) - #137

Merged
so5 merged 1 commit into
maintenance2026from
backport/version-json-no-commit-back-maintenance2026
Sep 11, 2026
Merged

so5 merged 1 commit into
maintenance2026from
backport/version-json-no-commit-back-maintenance2026

Conversation

@so5

@so5 so5 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

概要

main の PR #136aicshud/WHEEL#1014)を maintenance2026 へ cherry-pick したものです。
内容は PR #136 と同じ — run_test.yml による version.json の commit-back を廃止し、
ビルド時(docker build / versioner ステージ)に焼き込む方式に変更します。
背景は #136 を参照してください。

このブランチ向けに調整した点

cherry-pick 時に conflict した箇所を、このブランチの実態に合わせて解消しています。

  • run_test.yml / build_and_deploy.yml のコメント中の main は、このブランチでは
    まだ master 表記のままなのでそちらを維持しました。
  • Dockerfileexec ステージにあった RUN npm prune --production はこのブランチ
    独自の既存動作なのでそのまま残し、そこにバージョン焼き込みステップを追加しました
    (main 側の「pruneしない」という注釈はこのブランチには当てはまらないため入れていません)。
  • entrypoint.sh の ssh-agent 修正(PR fix(entrypoint): start ssh-agent without writing into the bind-mounted home #135)はこのブランチにまだ backport されて
    いないため、Dockerfile への該当ブロック追加は行っていません。
  • AGENTS.md / TEST_GUIDE.md / documentMD/design/developer_guide.md /
    documentMD/design/testing.md はこのブランチにまだ存在しないため、対応するドキュメント
    修正は含めていません(documentMD/design/design.md は存在するので ci: version.json の commit-back を廃止しビルド時に焼き込む (aicshud/WHEEL#1014) #136 と同じ
    「バージョン番号の管理」セクションを追加しています)。

動作確認

このブランチの Dockerfile で実ビルドして確認しました。

  • docker build --target versioner: git describe--dirty なし)が動くこと
    (このブランチでは master-14-g<sha> のような値になります)。
  • docker build --target exec(build-arg なし): <git describe>-local
    server/app/db/version.json に焼き込まれること。

🤖 Generated with Claude Code

https://claude.ai/code/session_01C3jKNM1qubomM8UTRdkEWu

…ime (#136)

Backport of PR #136 (main) to maintenance2026. Adjusted for this branch:
- kept "master" branch naming used in this line's run_test.yml /
  build_and_deploy.yml comments (unlike main, not yet renamed here)
- kept `RUN npm prune --production` in the exec stage as-is (this branch
  still prunes; main's "don't prune" comment doesn't apply here)
- did not add the entrypoint.sh ssh-agent block (PR #135, not backported
  to this branch) or the doc files that don't exist here yet (AGENTS.md,
  TEST_GUIDE.md, documentMD/design/{developer_guide,testing}.md)

The `[skip ci] update version number` step in run_test.yml rewrote
server/app/db/version.json and pushed it to every feature branch, so
parallel PRs conflicted on that file and a stale `-beta` value rode onto
main/maintenance at merge (issue #1014).

- run_test.yml: drop the version-stamp / commit / push steps and the
  now-unused GITHUB_TOKEN from the test job. CI no longer touches the file.
- version.json: the committed value is a fixed placeholder
  ("not defined - this is a development build"). Nothing in CI edits the
  tracked file, so it never diverges between branches -> no more conflicts.
- build_and_deploy.yml: pass the computed version through the
  WHEEL_VERSION build-arg instead of editing the worktree; repack
  source.tar.gz from a clean tree with the real version dropped in
  (git archive shipped the placeholder before).
- Dockerfile: a throwaway `versioner` stage runs `git describe` on the
  build context, so a plain `docker build .` still bakes a
  commit-identifying version (`<describe>-local`). `--build-arg
  WHEEL_VERSION` overrides it; an un-stamped source build keeps whatever
  version.json ships. No --dirty: .dockerignore hides tracked paths
  (documentMD/) from the stage's `COPY . .`, so --dirty would always fire.

versionInfo.js is unchanged - it still statically imports version.json.

(cherry picked from commit 931f0ae)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3jKNM1qubomM8UTRdkEWu
@so5
so5 merged commit dad1f45 into maintenance2026 Sep 11, 2026
@so5
so5 deleted the backport/version-json-no-commit-back-maintenance2026 branch September 11, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant