Files
filtry_www/install-cloudflare-hook.ps1
T
2026-09-18 19:34:38 +02:00

15 lines
591 B
PowerShell

$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$hooks = Join-Path $root ".git\hooks"
$source = Join-Path $root "hooks\post-push.cmd"
$target = Join-Path $hooks "post-push.cmd"
if (-not (Test-Path $hooks)) {
throw "Nie znaleziono folderu .git/hooks. Uruchom skrypt w katalogu repozytorium."
}
Copy-Item $source $target -Force
Remove-Item (Join-Path $hooks "post-push") -Force -ErrorAction SilentlyContinue
Write-Host "Zainstalowano hook post-push: $target"
Write-Host "Po kazdym udanym git push zostanie uruchomiony deploy do Cloudflare Pages."