Skip to content

Commit

Permalink
Option to skip install of dotnet cli
Browse files Browse the repository at this point in the history
Added option to skip installation of the dotnet cli in the
BuildWebPackage task
  • Loading branch information
kirkone committed Jul 12, 2016
1 parent 86e56df commit 66ded9b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
13 changes: 10 additions & 3 deletions VSTS.DNX.Tasks.BuildWebPackage/BuildWebPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ param (
[String] [Parameter(Mandatory = $false)]
$WorkingFolder = "",
[String] [Parameter(Mandatory = $false)]
$SourceFolder = ""
$SourceFolder = "",
[string] [Parameter(Mandatory = $true)]
$SkipDotNetInstall
)

Write-Verbose "Entering script BuildWebPackage.ps1"
Expand All @@ -33,11 +35,16 @@ Function Main

$SourceFolder = Get-TrimedPath $SourceFolder

$isSkipDotNetInstall = [System.Convert]::ToBoolean($SkipDotNetInstall)

$OutputFolder = $OutputFolder.Trim('"')

Import-Module "$(Split-Path -parent $PSCommandPath)\InstallDotnet.psm1"
if($isSkipDotNetInstall)
{
Import-Module "$(Split-Path -parent $PSCommandPath)\InstallDotnet.psm1"

Install-Dotnet
Install-Dotnet
}

$projects = $ProjectName.Trim() -split(" ");

Expand Down
9 changes: 9 additions & 0 deletions VSTS.DNX.Tasks.BuildWebPackage/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@
"required": false,
"helpMarkDown": "Folder where your project directories are. <br>Default is: \\src",
"groupName": "advanced"
},
{
"name": "SkipDotNetInstall",
"type": "boolean",
"label": "Skip DotNet CLI Install",
"defaultValue": "false",
"required": true,
"helpMarkDown": "Check this If you do not want to install dotnet cli or dotnet cli is already present.",
"groupName": "advanced"
}
],
"instanceNameFormat": "Build Web Package: $(ProjectName)",
Expand Down

0 comments on commit 66ded9b

Please sign in to comment.