Wdrażaj Cloudflare przed pushem

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
2026-09-18 19:37:55 +02:00
co-authored by Copilot
parent f6f9360620
commit fd112b23f3
2 changed files with 10 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
repo_root=$(git rev-parse --show-toplevel)
echo "Cloudflare Pages: wdrazanie przed push..."
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$repo_root/deploy-cloudflare.ps1"
echo "Cloudflare Pages: wdrozenie zakonczone, kontynuuje push."
+3 -2
View File
@@ -1,8 +1,8 @@
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$hooks = Join-Path $root ".git\hooks"
$source = Join-Path $root "hooks\post-push"
$target = Join-Path $hooks "post-push"
$source = Join-Path $root "hooks\pre-push"
$target = Join-Path $hooks "pre-push"
if (-not (Test-Path $hooks)) {
throw "Nie znaleziono folderu .git/hooks. Uruchom skrypt w katalogu repozytorium."
@@ -11,6 +11,7 @@ if (-not (Test-Path $hooks)) {
git -C $root config --local core.hooksPath "$hooks"
Copy-Item $source $target -Force
Remove-Item (Join-Path $hooks "post-push.cmd") -Force -ErrorAction SilentlyContinue
Remove-Item (Join-Path $hooks "post-push") -Force -ErrorAction SilentlyContinue
$bash = "C:\Program Files\Git\bin\bash.exe"
if (Test-Path $bash) {