build: Add check for 'git' on Windows and macOS deps scripts

Since git is actually not a dependency, we need to do some checks.

See: https://gitlab.gnome.org/Infrastructure/gimp-web-devel/-/issues/54
This commit is contained in:
Bruno Lopes 2026-04-02 22:24:22 -03:00
parent 65f4c6c47f
commit febeb89c55
2 changed files with 4 additions and 0 deletions

View file

@ -14,6 +14,8 @@ elif [ $(basename "$PWD") = 'macos' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
which git >/dev/null 2>&1 || { printf '\033[31m(ERROR)\033[0m: git is required for this script. Please, read: https://developer.gimp.org/core/setup/git/#source-from-git\n'; exit 1; }
GIT_DEPTH='1'
PARENT_DIR='/..'

View file

@ -14,6 +14,8 @@ elseif (Test-Path 1_build-deps-msys2.ps1 -Type Leaf)
}
if (-not $GITLAB_CI)
{
if (-not (Get-Command "git" -ErrorAction SilentlyContinue)) { Write-Host '(ERROR): git is required for this script. Please, read: https://developer.gimp.org/core/setup/git/#source-from-git' -ForegroundColor Red; exit 1 }
$GIT_DEPTH = '1'
$PARENT_DIR = '\..'