Skip to content

Commit

Permalink
Fix for $isSkipDotNetInstall handled wrong
Browse files Browse the repository at this point in the history
- The IF for the check had a -Not missing
- added some more output to the log
  • Loading branch information
kirkone committed Aug 29, 2016
1 parent 2c2b140 commit 8de1eea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion VSTS.DNX.Tasks.BuildNugetPackage/BuildNugetPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Function Main
$versionSuffix = "--version-suffix $prefix$($VersionData[0])"
}

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

Expand Down Expand Up @@ -80,17 +80,20 @@ Function Main

$projectList = $projects | % {"""$SourceFolder$($_.Trim('"'))""" } | & {"$input"}
Invoke-Expression "& dotnet restore $projectList"
Write-Output " Restore done."

Write-Output "dotnet build for:"
Write-Output $($projectList -split(" ") | % { " $_" })
Invoke-Expression "& dotnet build $projectList -c $BuildConfiguration"
Write-Output " Build done."

foreach($project in $projects)
{
$p = "$SourceFolder$($project.Trim('"'))"
Write-Output "dotnet pack for:"
Write-Output " $p"
Invoke-Expression "& dotnet pack $p -c $BuildConfiguration -o ""$OutputFolder"" $versionSuffix"
Write-Output " Pack done for: $p"
}
}

Expand Down
5 changes: 4 additions & 1 deletion VSTS.DNX.Tasks.BuildWebPackage/BuildWebPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Function Main

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

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

Expand Down Expand Up @@ -69,10 +69,12 @@ Function Main

$projectList = $projects | % {"""$SourceFolder$($_.Trim('"'))""" } | & {"$input"}
Invoke-Expression "& dotnet restore $projectList"
Write-Output " Restore done."

Write-Output "dotnet build for:"
Write-Output $($projectList -split(" ") | % { " $_" })
Invoke-Expression "& dotnet build $projectList -c $BuildConfiguration"
Write-Output " Build done."

foreach($project in $projects)
{
Expand All @@ -81,6 +83,7 @@ Function Main
Write-Output "dotnet publish for:"
Write-Output " $p"
Invoke-Expression "& dotnet publish $p -c $BuildConfiguration -o ""$OutputFolder\$outDir"" --no-build"
Write-Output " Publish done for: $p"
}
}

Expand Down
6 changes: 4 additions & 2 deletions VSTS.DNX.Tasks.Shared/InstallDotnet.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Write-Output "Dotnet found:"
Write-Output " $($dotnet.Path)"
$dotnetPath = $dotnet.Path
Write-Output " Skipping installation."
}
else
{
Expand All @@ -29,13 +30,14 @@
$webClient = New-Object System.Net.WebClient
$webClient.Proxy = [System.Net.WebRequest]::DefaultWebProxy
$webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
Write-Output "Downloading dotnet-install.ps1 to $dotnetPs1Path"
Write-Output " Downloading dotnet-install.ps1 to $dotnetPs1Path"
$webClient.DownloadFile("https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1", $dotnetPs1Path)

$dotnetPath = $dotnetPs1Path

Write-Output "Calling: $dotnetPath"
Write-Output " Calling: $dotnetPath"
& "$dotnetPath"
Write-Output " Done."
}

Write-Verbose "Leaving Method Install-Dotnet"
Expand Down

0 comments on commit 8de1eea

Please sign in to comment.