Files
filtry_www/install-cloudflare-hook.ps1
T

15 lines
591 B
PowerShell
Raw Normal View History

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