diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 736f9bdad..971e7d220 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -61,6 +61,8 @@ jobs: nativeAotRid: win-x64 platformName: .NET - Windows + - template: templates\fail-on-dirty-tree.yaml + - template: templates\fail-on-issue.yaml - task: PublishPipelineArtifact@1 @@ -92,6 +94,8 @@ jobs: nativeAotRid: osx-x64 platformName: .NET - MacOS + - template: templates\fail-on-dirty-tree.yaml + - template: templates\fail-on-issue.yaml diff --git a/build-tools/automation/templates/fail-on-dirty-tree.yaml b/build-tools/automation/templates/fail-on-dirty-tree.yaml new file mode 100644 index 000000000..38b4dbc20 --- /dev/null +++ b/build-tools/automation/templates/fail-on-dirty-tree.yaml @@ -0,0 +1,22 @@ +# Ensure the build did not produce any modified checked in files + +parameters: + condition: succeeded() + +steps: +- powershell: | + # Run this to log the output for the user + git status + + # Run this to error the build if untracked files + $process= git status --porcelain --untracked-files=no + + if ($process) + { + Write-Host "##vso[task.logissue type=error]git tree has modified tracked files." + Write-Host "##vso[task.complete result=Failed;]" + } + + git diff + displayName: Ensure no modified committed files + condition: ${{ parameters.condition }} diff --git a/src/Java.Base/Java.Base.targets b/src/Java.Base/Java.Base.targets index bcbe0d161..1ec03f024 100644 --- a/src/Java.Base/Java.Base.targets +++ b/src/Java.Base/Java.Base.targets @@ -84,4 +84,18 @@ + + + + + + +