Skip to content

Commit

Permalink
Fixed bug with exclude version parameter.
Browse files Browse the repository at this point in the history
Fixed nuget restore args.
  • Loading branch information
ericsciple committed Jun 26, 2015
1 parent 5ed669d commit aa3b5a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 31 deletions.
21 changes: 10 additions & 11 deletions Tasks/NuGetInstaller/NuGetInstaller.ps1
Expand Up @@ -2,9 +2,9 @@ param(
[string]$solution,
[ValidateSet("Restore", "Install")]
[string]$restoreMode = "Restore",
[string]$excludeVersion,
[string]$excludeVersion, # Support for excludeVersion has been deprecated.
[string]$noCache,
[string]$nuGetArgs,
[string]$nuGetRestoreArgs,
[string]$nuGetPath
)

Expand All @@ -26,6 +26,12 @@ if(!$solution)
$b_excludeVersion = Convert-String $excludeVersion Boolean
$b_noCache = Convert-String $noCache Boolean

# Warn if deprecated parameters were supplied.
if ($excludeVersion -and "$excludeVersion".ToUpperInvariant() -ne 'FALSE')
{
Write-Warning (Get-LocalizedString -Key 'The Exclude Version parameter has been deprecated. Ignoring the value.')
}

# check for solution pattern
if ($solution.Contains("*") -or $solution.Contains("?"))
{
Expand All @@ -46,13 +52,6 @@ if (!$solutionFiles)
}

$args = " -NonInteractive";


if($b_excludeVersion)
{
$args = (" -ExcludeVersion " + $args);
}

if($b_noCache)
{
$args = (" -NoCache " + $args);
Expand All @@ -63,9 +62,9 @@ if(!$nuGetPath)
$nuGetPath = Get-ToolPath -Name 'NuGet.exe';
}

if($nuGetArgs)
if($nuGetRestoreArgs)
{
$args = ($args + " " + $nuGetArgs);
$args = ($args + " " + $nuGetRestoreArgs);
}


Expand Down
Expand Up @@ -9,8 +9,6 @@
"loc.group.displayName.advanced": "Advanced",
"loc.input.label.solution": "Path to Solution",
"loc.input.help.solution": "The path to the Visual Studio Solution file",
"loc.input.label.excludeVersion": "Exclude Version",
"loc.input.help.excludeVersion": "Makes NuGet exclude package version from package folder names. Equivilent to the -ExcludeVersion NuGet.exe command line argument",
"loc.input.label.noCache": "Disable local cache",
"loc.input.help.noCache": "Equivalent to the -NoCache NuGet.exe commanline argument",
"loc.input.label.nuGetRestoreArgs": "NuGet Arguments",
Expand Down
10 changes: 1 addition & 9 deletions Tasks/NuGetInstaller/task.json
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 11
"Patch": 12
},
"minimumAgentVersion": "1.83.0",
"groups": [
Expand All @@ -29,14 +29,6 @@
"helpMarkDown": "The path to the Visual Studio Solution file",
"required":true
},
{
"name": "excludeVersion",
"type": "boolean",
"label": "Exclude Version",
"defaultValue": "false",
"helpMarkDown": "Makes NuGet exclude package version from package folder names. Equivilent to the -ExcludeVersion NuGet.exe command line argument",
"required":"false"
},
{
"name": "noCache",
"type": "boolean",
Expand Down
10 changes: 1 addition & 9 deletions Tasks/NuGetInstaller/task.loc.json
Expand Up @@ -12,7 +12,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 11
"Patch": 12
},
"minimumAgentVersion": "1.83.0",
"groups": [
Expand All @@ -32,14 +32,6 @@
"helpMarkDown": "ms-resource:loc.input.help.solution",
"required": true
},
{
"name": "excludeVersion",
"type": "boolean",
"label": "ms-resource:loc.input.label.excludeVersion",
"defaultValue": "false",
"helpMarkDown": "ms-resource:loc.input.help.excludeVersion",
"required": "false"
},
{
"name": "noCache",
"type": "boolean",
Expand Down

0 comments on commit aa3b5a6

Please sign in to comment.