diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0309e02 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +scripts/*.sh text eol=lf diff --git a/scripts/deploy.ps1 b/scripts/deploy.ps1 index abf8abe..51b330c 100644 --- a/scripts/deploy.ps1 +++ b/scripts/deploy.ps1 @@ -95,7 +95,7 @@ docker compose up -d --build --remove-orphans info "Waiting for health check ($HEALTH_URL)…" ok=0 for ((i = 1; i <= HEALTH_RETRIES; i++)); do - if curl -fsS -o /dev/null "$HEALTH_URL"; then + if curl -fsS -o /dev/null "$HEALTH_URL" 2>/dev/null; then ok=1 break fi @@ -118,6 +118,9 @@ info "Service status:" docker compose ps '@ +# PowerShell here-strings use CRLF on Windows; strip CR before sending to remote bash. +$RemoteScript = ($RemoteScript -replace "`r`n", "`n") -replace "`r", "" + $RemoteScript | & ssh @SshOpts $DeployHost bash -s -- ` $DeployDir ` $Branch ` diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 17c42bc..7cc48c7 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -107,7 +107,7 @@ docker compose up -d --build --remove-orphans info "Waiting for health check ($HEALTH_URL)…" ok=0 for ((i = 1; i <= HEALTH_RETRIES; i++)); do - if curl -fsS -o /dev/null "$HEALTH_URL"; then + if curl -fsS -o /dev/null "$HEALTH_URL" 2>/dev/null; then ok=1 break fi