mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Consolidate to one Nuget feed (#1155)
This commit is contained in:
@@ -31,7 +31,7 @@ http://cakebuild.net
|
||||
Param(
|
||||
[string]$Script = "build.cake",
|
||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
||||
[string]$Verbosity = "Verbose",
|
||||
[string]$Verbosity = "Verbose",
|
||||
[Alias("DryRun","Noop")]
|
||||
[switch]$WhatIf,
|
||||
[switch]$Mono,
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user