From 20537fb927e9db4bdb24632c3853c6fd788d2201 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 1 May 2024 01:33:27 -0500 Subject: [PATCH] Force single feed in main branch (#156) --- NuGet.Config | 4 ++++ build/UVAtlas-GitHub-SDK-prerelease.yml | 24 ++++++------------------ build/UVAtlas-GitHub-SDK-release.yml | 24 ++++++------------------ build/UVAtlas-SDL.yml | 12 +++--------- 4 files changed, 19 insertions(+), 45 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 7e49cd0..e35944e 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -3,4 +3,8 @@ + + + + diff --git a/build/UVAtlas-GitHub-SDK-prerelease.yml b/build/UVAtlas-GitHub-SDK-prerelease.yml index b6f12e8..0a235a7 100644 --- a/build/UVAtlas-GitHub-SDK-prerelease.yml +++ b/build/UVAtlas-GitHub-SDK-prerelease.yml @@ -52,17 +52,11 @@ jobs: inputs: command: custom arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - - task: PowerShell@2 + - task: NuGetCommand@2 displayName: 'Set nuget.config to single source' inputs: - targetType: inline - script: | - $file = '.\NuGet.Config' - $doc = [xml](Get-Content $file) - $newelement = $doc.CreateElement("clear") - $clearadd = $doc.configuration.packageSources.PrependChild($newelement) - $doc.OuterXml | Set-Content $file - + command: custom + arguments: sources remove -Name nuget.org -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: nuget-security-analysis@0 displayName: 'Secure Supply Chain Analysis' - task: NuGetCommand@2 @@ -152,17 +146,11 @@ jobs: inputs: command: custom arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - - task: PowerShell@2 + - task: NuGetCommand@2 displayName: 'Set nuget.config to single source' inputs: - targetType: inline - script: | - $file = '.\NuGet.Config' - $doc = [xml](Get-Content $file) - $newelement = $doc.CreateElement("clear") - $clearadd = $doc.configuration.packageSources.PrependChild($newelement) - $doc.OuterXml | Set-Content $file - + command: custom + arguments: sources remove -Name nuget.org -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: nuget-security-analysis@0 displayName: 'Secure Supply Chain Analysis' - task: NuGetCommand@2 diff --git a/build/UVAtlas-GitHub-SDK-release.yml b/build/UVAtlas-GitHub-SDK-release.yml index 838c934..1efdbf4 100644 --- a/build/UVAtlas-GitHub-SDK-release.yml +++ b/build/UVAtlas-GitHub-SDK-release.yml @@ -52,17 +52,11 @@ jobs: inputs: command: custom arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - - task: PowerShell@2 + - task: NuGetCommand@2 displayName: 'Set nuget.config to single source' inputs: - targetType: inline - script: | - $file = '.\NuGet.Config' - $doc = [xml](Get-Content $file) - $newelement = $doc.CreateElement("clear") - $clearadd = $doc.configuration.packageSources.PrependChild($newelement) - $doc.OuterXml | Set-Content $file - + command: custom + arguments: sources remove -Name nuget.org -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: nuget-security-analysis@0 displayName: 'Secure Supply Chain Analysis' - task: NuGetCommand@2 @@ -152,17 +146,11 @@ jobs: inputs: command: custom arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - - task: PowerShell@2 + - task: NuGetCommand@2 displayName: 'Set nuget.config to single source' inputs: - targetType: inline - script: | - $file = '.\NuGet.Config' - $doc = [xml](Get-Content $file) - $newelement = $doc.CreateElement("clear") - $clearadd = $doc.configuration.packageSources.PrependChild($newelement) - $doc.OuterXml | Set-Content $file - + command: custom + arguments: sources remove -Name nuget.org -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: nuget-security-analysis@0 displayName: 'Secure Supply Chain Analysis' - task: NuGetCommand@2 diff --git a/build/UVAtlas-SDL.yml b/build/UVAtlas-SDL.yml index 2107ae0..26aa0ff 100644 --- a/build/UVAtlas-SDL.yml +++ b/build/UVAtlas-SDL.yml @@ -49,17 +49,11 @@ jobs: inputs: command: custom arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - - task: PowerShell@2 + - task: NuGetCommand@2 displayName: 'Set nuget.config to single source' inputs: - targetType: inline - script: | - $file = '.\NuGet.Config' - $doc = [xml](Get-Content $file) - $newelement = $doc.CreateElement("clear") - $clearadd = $doc.configuration.packageSources.PrependChild($newelement) - $doc.OuterXml | Set-Content $file - + command: custom + arguments: sources remove -Name nuget.org -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: nuget-security-analysis@0 displayName: 'Secure Supply Chain Analysis' - task: NodeTool@0