Last active
August 29, 2015 14:02
-
-
Save ilkerde/34c4527aea40a6e90464 to your computer and use it in GitHub Desktop.
Psake-Selfboot-Nuget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string[]] $TaskListPsake = @(), | |
[string] $FrameworkPsake = '4.0', | |
[switch] $DocsPsake = $false, | |
[hashtable] $ParametersPsake = @{}, | |
[hashtable] $PropertiesPsake = @{} | |
) | |
$main = -not $MyInvocation.PSScriptRoot | |
$root = $PSScriptRoot | |
$nugetExe = "$root\.nuget\nuget.exe" | |
if ($main) { | |
& $nugetExe restore "$root\.nuget\packages.config" -PackagesDirectory "$root\packages" | Out-Null | |
Remove-Module [p]sake | |
Import-Module "$root\packages\psake*\tools\psake.psm1" | |
Invoke-PSake $PSCommandPath $TaskListPsake $FrameworkPsake $DocsPsake $ParametersPsake $PropertiesPsake -nologo | |
return | |
} | |
task Hello { | |
Write-Output 'Hello World.' | |
} | |
task Default -depends Hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment