ensure to git reset checkout before updating git submodule

This commit is contained in:
Nacho Codoñer
2024-07-30 16:00:14 +02:00
parent 052ba5241c
commit 0ff7948fe2

View File

@@ -7,6 +7,9 @@ If ($env:PLATFORM -Match '^x86|x64$') {
$dirCheckout = (Get-Item $PSScriptRoot).parent.parent.parent.FullName
$meteorBat = Join-Path $dirCheckout 'meteor.bat'
Write-Host "Resetting git checkout..." -ForegroundColor Magenta
& git.exe -C "$dirCheckout" reset --hard
Write-Host "Updating submodules recursively..." -ForegroundColor Magenta
# Appveyor suggests -q flag for 'git submodule...' https://goo.gl/4TFAHm
& git.exe -C "$dirCheckout" submodule -q update --init --recursive
@@ -36,4 +39,4 @@ while ($attempt -gt 0 -and -not $success) {
If ($LASTEXITCODE -ne 0) {
throw "Running .\meteor --get-ready failed three times."
}
}