summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortanaka takashi <isazaka@gmail.com>2026-08-26 22:26:58 +0900
committertanaka takashi <isazaka@gmail.com>2026-08-26 22:26:58 +0900
commitd768a1c738043ae673b60ca6a516c041772ede24 (patch)
treef7f9c7cee852d8f7927dd30cada727a9d22ed856
parentc0c2408e6830d82b5baad57e2b89d5c1e05dfc31 (diff)
デプロイ用スクリプト修正
-rw-r--r--deploy.ps15
-rw-r--r--doc/Design.md2
2 files changed, 4 insertions, 3 deletions
diff --git a/deploy.ps1 b/deploy.ps1
index 970bacd..da4a0dc 100644
--- a/deploy.ps1
+++ b/deploy.ps1
@@ -10,7 +10,7 @@ $deploymentSucceeded = $false
$failureMessage = $null
$locationPushed = $false
$nativeCommands = @{}
-$sshOptions = @("-o", "BatchMode=yes", "-o", "ConnectTimeout=10")
+$sshOptions = @("-o", "ConnectTimeout=10")
function Get-NativeCommandPath {
param(
@@ -298,7 +298,8 @@ finally {
$null -ne $remoteArchive
) {
$cleanupCommand = "rm -f -- '$remoteArchive'"
- & $nativeCommands["ssh"] @sshOptions $remoteTarget $cleanupCommand 2>$null | Out-Null
+ $cleanupSshOptions = @($sshOptions) + @("-o", "BatchMode=yes")
+ & $nativeCommands["ssh"] @cleanupSshOptions $remoteTarget $cleanupCommand 2>$null | Out-Null
}
}
diff --git a/doc/Design.md b/doc/Design.md
index 0b2d443..26fc64c 100644
--- a/doc/Design.md
+++ b/doc/Design.md
@@ -498,7 +498,7 @@ Markdownの @/ 内部リンク
|---|---|
| 設定読込 | rootの`deploy.config.psd1`を`Import-PowerShellDataFile`で自動読込する。command line引数は使用しない。 |
| 接続 | 設定内の`DeployHost`と`DeployUser`をWindows OpenSSHの`ssh`/`scp`へ渡す。 |
-| 認証 | `IdentityFile`が空ならOpenSSH標準key探索を使用し、値があれば指定fileを使用する。 |
+| 認証 | `IdentityFile`が空ならOpenSSH標準key探索を使用し、値があれば指定fileを使用する。秘密鍵のpassphraseは`scp`/`ssh`が対話入力を求め、fileへ保存しない。失敗時cleanupだけは`BatchMode=yes`で入力待ちを防ぐ。 |
| Remote base | 設定内の`RemoteBase`を使用し、誤操作防止のため`/srv/www/`配下だけを許可する。 |
| 転送単位 | `public/`の中身だけを含む一時`tar.gz`。 |
| Release ID | ローカル時刻の`yyyyMMdd-HHmmss`。 |