Giuliano De Luca cbcc2041d4 New sample SPFx webhooks real time (#351)
* first commit

* Implemented GetChanges API, Readme updated, New property "socket server url"

* added some scripts in order to automate the provisioning and deployment, readme updated, minor bug fix
2017-11-06 09:32:25 +02:00

24 lines
1.2 KiB
PowerShell

#################
# Configuration #
#################
$cdnSite = "https://giuleon.sharepoint.com/" # => CDN SharePoint site
$cdnLib = "cdn/SPFx-react-webhooks-realtime" # => Document library and eventual folders
#######
# End #
#######
Write-Host ************************************************************************************** -ForegroundColor Yellow
Write-Host * Reading the cdnBasePath from write-manifests.json and collectiong the bundle files * -ForegroundColor Yellow
Write-Host ************************************************************************************** -ForegroundColor Yellow
$cdnConfig = Get-Content -Raw -Path .\config\copy-assets.json | ConvertFrom-Json
$bundlePath = Convert-Path $cdnConfig.deployCdnPath
$files = Get-ChildItem $bundlePath\*.*
Write-Host **************************************** -ForegroundColor Yellow
Write-Host Uploading the bundle on Office 365 CDN * -ForegroundColor Yellow
Write-Host **************************************** -ForegroundColor Yellow
Connect-PnPOnline $cdnSite -Credentials giuleon
foreach ($file in $files) {
$fullPath = $file.DirectoryName + "\" + $file.Name
Add-PnPFile -Path $fullPath -Folder $cdnLib
}