forked from SharePoint/PnP-Guidance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.openpublishing.build.ps1
18 lines (16 loc) · 783 Bytes
/
.openpublishing.build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1 Download buildcore script to local
echo "download build core script to local with source url: $buildCorePowershellUrl"
$repositoryRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition
$buildCorePowershellDestination = "$repositoryRoot\.openpublishing.buildcore.ps1"
Invoke-WebRequest $buildCorePowershellUrl -OutFile $buildCorePowershellDestination
# Step-2: Run build core
echo "run build core script with parameters: $parameters"
$arguments = "-parameters:'$parameters'"
Invoke-Expression "$buildCorePowershellDestination $arguments"
exit $LASTEXITCODE