feat(install): devbase ワンライナー installer (curl | bash) (PLAN31_1)#47
Merged
Conversation
clone (既存なら git pull --ff-only) して bin/devbase init を 1 回呼ぶ薄い installer を新設。uv 自動導入・PATH/補完登録・plugins.yml 生成・冪等性・ 旧版移行はすべて既存の init に委譲する。 - 前提チェック: git/curl 必須・docker は警告のみ - DEVBASE_INSTALL_DIR/_REPO/_REF で配置先・clone元・ref を上書き可能 - DEVBASE_INSTALL_REF はサニタイズ (オプション注入/メタ文字を拒否) - 既存ディレクトリが devbase 以外の非空なら誤上書きを避けて中止 - 非 TTY (curl|bash) で対話しない。env init は対話必須のため案内のみ - tests/cli/test_install_sh.py: clone/init/冪等pull/中止/git不在/不正REF を検証 - CI に install.sh の ShellCheck (severity=error) を追加 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ワンライナー節の「env init は対話が必要なため案内のみで、自動実行はしません」 は冗長なため削除 (getting-started 側に同旨の記載あり)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`... | bash && source "$(~/devbase/bin/devbase shell-rc)"` の形にして、 インストール直後にその端末で devbase が使えるようにする。`&&` 以降は パイプのサブシェルではなく呼び出し元の対話シェルで実行されるため、 installer 本体を変更せずワンライナーだけで現在のシェルに PATH を通せる。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
長さの主因だった URL を 2 度出さないよう、ヘッドラインは `curl ... | bash` の素の 1 行に戻し、現在端末での即時有効化 (`&& source "$(...)"`) はインライン文章で案内する形に変更。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
plan §8 の未決事項「正規ホスティング」を確定。GitHub Pages + カスタムドメイン dl.basex.jp で https://dl.basex.jp/install.sh を 配信する構成・DNS 仕様(お名前.com は CNAME 用 API 無し)・ Actions 配信方式・初回セットアップ手順・検証コマンド・コスト比較を docs/developer/installer-hosting.md にまとめる。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
install.sh のみを成果物として公開する Pages デプロイワークフローを追加。 main への push (install.sh / pages.yml 変更時) で自動デプロイする。 配信仕様: docs/developer/installer-hosting.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
issues/PLAN31_1_devbase-installer.mdcurl -fsSL .../install.sh | bashで clone(既存ならgit pull --ff-only)→bin/devbase initまで自動完了するワンライナー installer を新設plugins.yml生成・冪等性・旧版移行はすべて既存のdevbase initに委譲(installer は薄い 2 手のみ)変更点
install.sh(新規):set -euo pipefail/ git・curl 必須チェック(docker は警告のみ)/DEVBASE_INSTALL_DIR・_REPO・_REF対応 /DEVBASE_INSTALL_REFサニタイズ(先頭-・シェルメタ文字・コマンド置換を拒否)/ 既存ディレクトリ3分岐(pull / 中止 / clone)/cd後にbin/devbase init1回 / 完了案内tests/cli/test_install_sh.py(新規): ローカル雛形 repo + init スタブで分岐ロジックを検証(新規clone・init1回/CWD・既定$HOME/devbase・冪等pull・非devbase中止・git不在・不正REF×4 = 10件).github/workflows/ci.yml: shellcheck ジョブにinstall.sh(severity=error)を追加README.md/docs/user/getting-started.md: ワンライナー節 + env 変数表 +curl|bash確認手順を追記CHANGELOG.md: Unreleased に追記非機能 / セキュリティ
curl|bash)で対話プロンプトを出さない。env initは対話必須のため実行せず案内のみgit clone --branch "$REF" -- "$REPO" "$DIR"で位置引数のオプション解釈を遮断 + REF charset 検証Test plan
pytest tests/cli/test_install_sh.py→ 10 passedpytest→ 474 passed / 1 skippedshellcheck install.sh(全 severity)指摘ゼロ /shellcheck --severity=error(CI 相当)通過~/devbaseへ通しinit後にsource "$(bin/devbase shell-rc)"→devbase --helpが PATH 解決すること(ホスト Mac で確認推奨)