Uruchamiaj deploy po pushu w Windows
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
repo_root=$(git rev-parse --show-toplevel)
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$repo_root/deploy-cloudflare.ps1"
|
||||
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal
|
||||
set "REPO_ROOT=%~dp0..\.."
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%REPO_ROOT%\deploy-cloudflare.ps1"
|
||||
if errorlevel 1 exit /b 1
|
||||
exit /b 0
|
||||
@@ -1,13 +1,14 @@
|
||||
$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\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."
|
||||
|
||||
Reference in New Issue
Block a user