Consolidate to one Nuget feed (#1155)

This commit is contained in:
Charles Gagnon
2021-02-02 10:18:05 -08:00
committed by GitHub
parent 9fc5dfa647
commit d0600cd219
11 changed files with 23 additions and 56 deletions

View File

@@ -18,38 +18,13 @@ steps:
inputs:
useGlobalJson: true
- task: DotNetCoreCLI@1
displayName: 'dotnet restore src/Microsoft.SqlTools.Credentials'
inputs:
command: restore
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.Credentials'
arguments: '--configfile $(Build.SourcesDirectory)/nuget.config'
- task: DotNetCoreCLI@1
displayName: 'dotnet restore src/Microsoft.SqlTools.Hosting'
inputs:
command: restore
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.Hosting'
arguments: '--configfile $(Build.SourcesDirectory)/nuget.config'
- task: DotNetCoreCLI@1
displayName: 'dotnet restore src/Microsoft.SqlTools.ServiceLayer'
inputs:
command: restore
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.ServiceLayer'
arguments: '--configfile $(Build.SourcesDirectory)/nuget.config'
- task: DotNetCoreCLI@1
displayName: 'dotnet restore src/Microsoft.Kusto.ServiceLayer'
inputs:
command: restore
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer'
arguments: '--configfile $(Build.SourcesDirectory)/nuget.config'
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.SqlTools.ServiceLayer'
displayName: 'dotnet restore sqltoolsservice.sln'
inputs:
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.ServiceLayer'
command: restore
projects: '$(Build.SourcesDirectory)/sqltoolsservice.sln'
feedsToUse: config
nugetConfigPath: nuget.config
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.Kusto.ServiceLayer'
@@ -65,9 +40,11 @@ steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.Kusto.ServiceLayer --configuration Release'
inputs:
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer '
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer'
arguments: '--configuration Release'
- task: NuGetAuthenticate@0
- task: BatchScript@1
displayName: 'Run script build.cmd'
inputs:
@@ -75,26 +52,26 @@ steps:
arguments: '-target=all -mono'
continueOnError: true
- task: DotNetCoreCLI@1
- task: DotNetCoreCLI@2
displayName: 'dotnet restore test/Microsoft.SqlTools.ServiceLayer.UnitTests'
inputs:
command: restore
projects: test/Microsoft.SqlTools.ServiceLayer.UnitTests
- task: DotNetCoreCLI@1
- task: DotNetCoreCLI@2
displayName: 'dotnet restore test/Microsoft.Kusto.ServiceLayer.UnitTests'
inputs:
command: restore
projects: test/Microsoft.Kusto.ServiceLayer.UnitTests
- task: DotNetCoreCLI@1
- task: DotNetCoreCLI@2
displayName: 'dotnet test test/Microsoft.SqlTools.ServiceLayer.UnitTests'
inputs:
command: test
projects: test/Microsoft.SqlTools.ServiceLayer.UnitTests
arguments: '--logger "trx;LogFileName=xunit.trx"'
- task: DotNetCoreCLI@1
- task: DotNetCoreCLI@2
displayName: 'dotnet test test/Microsoft.Kusto.ServiceLayer.UnitTests'
inputs:
command: test

Binary file not shown.

Binary file not shown.

View File

@@ -2,8 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="Nuget Preview" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="Nuget" value="https://www.nuget.org/api/v2" />
<add key="DataTools Nuget" value="./bin/nuget" />
<add key="mssqltools" value="https://mssqltools.pkgs.visualstudio.com/_packaging/mssqltools_2/nuget/v3/index.json" />
</packageSources>
</configuration>

View File

@@ -45,14 +45,14 @@ Write-Host "Preparing to run build script..."
$PS_SCRIPT_ROOT = split-path -parent $MyInvocation.MyCommand.Definition;
$TOOLS_DIR = Join-Path $PSScriptRoot "..\.tools"
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe"
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
$PACKAGES_CONFIG = Join-Path $PS_SCRIPT_ROOT "packages.config"
# Should we use mono?
$UseMono = "";
if($Mono.IsPresent) {
Write-Verbose -Message "Using the Mono based scripting engine."
Write-Host "Using the Mono based scripting engine."
$UseMono = "-mono"
}
@@ -64,13 +64,13 @@ if($WhatIf.IsPresent) {
# Make sure tools folder exists
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
Write-Verbose -Message "Creating tools directory..."
Write-Host "Creating tools directory..."
New-Item -Path $TOOLS_DIR -Type directory | out-null
}
# Try download NuGet.exe if not exists
if (!(Test-Path $NUGET_EXE)) {
Write-Verbose -Message "Downloading NuGet.exe..."
Write-Host "Downloading NuGet.exe..."
try {
(New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE)
} catch {
@@ -88,10 +88,10 @@ if(-Not $SkipToolPackageRestore.IsPresent)
Push-Location
Set-Location $TOOLS_DIR
Write-Verbose -Message "Restoring tools from NuGet..."
Write-Host "Restoring tools from NuGet..."
$NuGetConfig = Invoke-Expression "&`"$NUGET_EXE`" config -configfile ../nuget.config"
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install $PACKAGES_CONFIG -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
Write-Verbose -Message ($NuGetOutput | out-string)
Write-Host ($NuGetOutput | out-string)
Pop-Location
if ($LASTEXITCODE -ne 0)

View File

@@ -6,4 +6,5 @@
<package id="Mono.TextTransform" version="1.0.0" />
<package id="mssql.XliffParser" version="0.5.3" />
<package id="mssql.ResX" version="0.2.0" />
<package id="xunit.runner.console" version="2.4.1" />
</packages>

View File

@@ -50,7 +50,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeCoverage", "CodeCoverag
ProjectSection(SolutionItems) = preProject
test\CodeCoverage\codecoverage.bat = test\CodeCoverage\codecoverage.bat
test\CodeCoverage\gulpfile.js = test\CodeCoverage\gulpfile.js
test\CodeCoverage\nuget.config = test\CodeCoverage\nuget.config
test\CodeCoverage\package.json = test\CodeCoverage\package.json
test\CodeCoverage\packages.config = test\CodeCoverage\packages.config
test\CodeCoverage\ReplaceText.vbs = test\CodeCoverage\ReplaceText.vbs

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration >
<packageSources>
<add key="https://www.nuget.org/api/v2/" value="https://www.nuget.org/api/v2/" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>