From e3647d746780184979c5f4677a8479e6922dcc38 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 10 Dec 2017 19:02:26 -0800 Subject: [PATCH] Remove nuget.exe downloader and nuproj --- init.ps1 | 9 +---- src/GitLink.NuGet/GitLink.NuGet.nuproj | 52 -------------------------- src/GitLink.NuGet/project.json | 11 ------ tools/Get-NuGetTool.ps1 | 15 -------- tools/Install-NuGetPackage.ps1 | 41 -------------------- tools/Restore-NuGetPackages.ps1 | 21 ----------- 6 files changed, 1 insertion(+), 148 deletions(-) delete mode 100644 src/GitLink.NuGet/GitLink.NuGet.nuproj delete mode 100644 src/GitLink.NuGet/project.json delete mode 100644 tools/Get-NuGetTool.ps1 delete mode 100644 tools/Install-NuGetPackage.ps1 delete mode 100644 tools/Restore-NuGetPackages.ps1 diff --git a/init.ps1 b/init.ps1 index c1398c5..535bfdc 100644 --- a/init.ps1 +++ b/init.ps1 @@ -12,15 +12,8 @@ try { $nugetVerbosity = 'quiet' if ($Verbose) { $nugetVerbosity = 'normal' } - # First restore NuProj packages since the solution restore depends on NuProj evaluation succeeding. - gci "$PSScriptRoot\src\project.json" -rec |? { $_.FullName -imatch 'nuget' } |% { - & "$toolsPath\Restore-NuGetPackages.ps1" -Path $_ -Verbosity $nugetVerbosity - } - # Restore VS solution dependencies - gci "$PSScriptRoot\src" -rec |? { $_.FullName.EndsWith('.sln') } |% { - & "$toolsPath\Restore-NuGetPackages.ps1" -Path $_.FullName -Verbosity $nugetVerbosity - } + msbuild.exe /t:restore "$PSScriptRoot\src\GitLink.sln" Write-Host "Successfully restored all dependencies" -ForegroundColor Yellow } diff --git a/src/GitLink.NuGet/GitLink.NuGet.nuproj b/src/GitLink.NuGet/GitLink.NuGet.nuproj deleted file mode 100644 index 338674f..0000000 --- a/src/GitLink.NuGet/GitLink.NuGet.nuproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Debug - AnyCPU - - - Release - AnyCPU - - - - 29e78909-b7fb-472c-a9a0-1749a8be9a9a - - - <_NuGetRoot>$(UserProfile)\.nuget\packages - <_NuGetRoot Condition="'$(NUGET_PACKAGES)' != ''">$(NUGET_PACKAGES) - $(_NuGetRoot)\NuProj\0.11.14-beta\tools - - - - GitLink - $(GitVersion_NuGetVersion) - GitLink - GeertvanHorrik,AArnott - GeertvanHorrik,AArnott - GitLink let's users step through your code hosted on any Git hosting service! This makes symbol servers obsolete which saves you both time - - - https://github.com/GitTools/GitLink - https://github.com/GitTools/GitLink/blob/$(APPVEYOR_REPO_COMMIT)/LICENSE - git pdb - true - https://raw.githubusercontent.com/GitTools/GitLink/$(APPVEYOR_REPO_COMMIT)/design/logo/logo_64.png - GetDeployableOutputs - - true - - - - - - - Build - - - - - - - diff --git a/src/GitLink.NuGet/project.json b/src/GitLink.NuGet/project.json deleted file mode 100644 index 584dba0..0000000 --- a/src/GitLink.NuGet/project.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "NuProj": "0.11.14-beta" - }, - "frameworks": { - "net451": {} - }, - "runtimes": { - "win": {} - } -} \ No newline at end of file diff --git a/tools/Get-NuGetTool.ps1 b/tools/Get-NuGetTool.ps1 deleted file mode 100644 index 800c67b..0000000 --- a/tools/Get-NuGetTool.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -<# -.SYNOPSIS - Downloads the NuGet.exe tool and returns the path to it. -#> - -$binaryToolsPath = "$PSScriptRoot\..\obj\tools" -if (!(Test-Path $binaryToolsPath)) { $null = mkdir $binaryToolsPath } -$nugetPath = "$binaryToolsPath\nuget.exe" -if (!(Test-Path $nugetPath)) { - $NuGetVersion = "4.4.1" - Write-Host "Downloading nuget.exe $NuGetVersion..." -ForegroundColor Yellow - Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/v$NuGetVersion/NuGet.exe" -OutFile $nugetPath -} - -$nugetPath diff --git a/tools/Install-NuGetPackage.ps1 b/tools/Install-NuGetPackage.ps1 deleted file mode 100644 index 4bca51c..0000000 --- a/tools/Install-NuGetPackage.ps1 +++ /dev/null @@ -1,41 +0,0 @@ -<# -.SYNOPSIS - Installs a NuGet package. -.PARAMETER PackageID - The Package ID to install. -.PARAMETER Version - The version of the package to install. If unspecified, the latest stable release is installed. -.PARAMETER Source - The package source feed to find the package to install from. -.PARAMETER PackagesDir - The directory to install the package to. By default, it uses the Packages folder at the root of the repo. -#> -Param( - [Parameter(Position=1,Mandatory=$true)] - [string]$PackageId, - [Parameter()] - [string]$Version, - [Parameter()] - [string]$Source, - [Parameter()] - [switch]$Prerelease, - [Parameter()] - [ValidateSet('Quiet','Normal','Detailed')] - [string]$Verbosity='normal' -) - -$nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1" - -try { - Write-Verbose "Installing $PackageId..." - $args = "Install",$PackageId - if ($Version) { $args += "-Version",$Version } - if ($Source) { $args += "-Source",$Source } - if ($Prerelease) { $args += "-Prerelease" } - $args += '-Verbosity',$Verbosity - - $p = Start-Process $nugetPath $args -NoNewWindow -Wait -PassThru - if ($p.ExitCode -ne 0) { throw } -} finally { - Pop-Location -} diff --git a/tools/Restore-NuGetPackages.ps1 b/tools/Restore-NuGetPackages.ps1 deleted file mode 100644 index 3e345e1..0000000 --- a/tools/Restore-NuGetPackages.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -<# -.SYNOPSIS - Restores NuGet packages. -.PARAMETER Path - The path of the solution, directory, packages.config or project.json file to restore packages from. - If not specified, the current directory is used. -.PARAMETER Verbosity -#> -Param( - [Parameter(Position=1)] - [string]$Path=(Get-Location), - [Parameter()] - [ValidateSet('Quiet','Normal','Detailed')] - [string]$Verbosity='normal' -) - -$nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1" - -Write-Verbose "Restoring NuGet packages for $Path" -& $nugetPath restore $Path -Verbosity $Verbosity -if ($lastexitcode -ne 0) { throw }