-
Notifications
You must be signed in to change notification settings - Fork 40
/
build.ps1
30 lines (23 loc) · 987 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
param ($TemplatePackRoot, $ScriptRoot)
try
{
Write-Host "Begin Project Templates Nuget pack ..."
$nugetOutputDirectory = "$($TemplatePackRoot)\Templates"
$nugetFileName = "$($ScriptRoot)\nuget.exe"
if (!(Test-Path $nugetFileName))
{
Write-Host "Downloading Nuget.exe ..."
Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile $nugetFileName
Write-Host "Downloading Nuget.exe complete"
}
$wpfNuspecPath = "$($ScriptRoot)\Wpf\Prism.Wpf.Templates.nuspec"
$xfNuspecPath = "$($ScriptRoot)\Xamarin.Forms\Prism.Xamarin.Forms.Templates.nuspec"
Invoke-Expression "$($nugetFileName) pack $($wpfNuspecPath) -OutputDirectory $($nugetOutputDirectory)"
Invoke-Expression "$($nugetFileName) pack $($xfNuspecPath) -OutputDirectory $($nugetOutputDirectory)"
Write-Host "Completed Project Templates Nuget pack ..."
}
catch
{
Write-Host $ErrorMessage = $_.Exception.Message
exit 1
}