azure-sdk-for-cpp/eng/common/scripts/check-for-git-changes.ps1
Azure SDK Bot d390750361
Sync eng/common directory with azure-sdk-tools for PR 7892 (#5451)
* Move git check for changes to script

* Minor fixes for 1es migration

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2024-03-15 17:24:05 -04:00

15 lines
376 B
PowerShell

echo "git add -A"
git add -A
echo "git diff --name-status --cached --exit-code"
git diff --name-status --cached --exit-code
if ($LastExitCode -ne 0) {
echo "##vso[task.setvariable variable=HasChanges]$true"
echo "Changes detected so setting HasChanges=true"
}
else {
echo "##vso[task.setvariable variable=HasChanges]$false"
echo "No changes so skipping code push"
}