From 1dc667cd839fbf1000006ad98d830c75c5ee02f8 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Thu, 9 Jan 2025 07:59:00 -1000 Subject: [PATCH 1/2] [ci] Fail build if any git tracked files were modified. --- build-tools/automation/azure-pipelines.yaml | 4 ++++ .../templates/fail-on-dirty-tree.yaml | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 build-tools/automation/templates/fail-on-dirty-tree.yaml 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 }} From 701536c52751f77efdaa475938ebe7513a5d1f3c Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Mon, 13 Jan 2025 18:55:16 -0500 Subject: [PATCH 2/2] Fix line endings of Java.Base-ref.cs --- src/Java.Base/Java.Base.targets | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 @@ + + + + + + +