mirror of
https://github.com/sinbad/UEScripts.git
synced 2025-02-23 13:15:23 +00:00
Only fail to sync if changes include .umap files
This commit is contained in:
parent
552f972bf5
commit
045db604ee
@ -89,27 +89,21 @@ if (-not $umapsOK) {
|
|||||||
Exit 5
|
Exit 5
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check no changes
|
# Check no changes, ONLY to .umap files
|
||||||
git diff --no-patch --exit-code
|
$statusOutput = git status --porcelain *.umap
|
||||||
if ($LASTEXITCODE -ne 0) {
|
foreach ($line in $statusOutput) {
|
||||||
Write-Output "Working copy is not clean (unstaged changes)"
|
if ($line -like "*.umap*") {
|
||||||
if ($dryrun) {
|
Write-Output "Uncommitted changes to .umap file(s) detected"
|
||||||
Write-Output "dryrun: Continuing but this will fail without -dryrun"
|
if ($dryrun) {
|
||||||
} else {
|
Write-Output "dryrun: Continuing but this will fail without -dryrun"
|
||||||
Exit $LASTEXITCODE
|
break
|
||||||
|
} else {
|
||||||
|
Write-Output "Cannot continue"
|
||||||
|
Exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
git diff --no-patch --cached --exit-code
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-Output "Working copy is not clean (staged changes)"
|
|
||||||
if ($dryrun) {
|
|
||||||
Write-Output "dryrun: Continuing but this will fail without -dryrun"
|
|
||||||
} else {
|
|
||||||
Exit $LASTEXITCODE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$result = 0
|
$result = 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user