Skip to content

Commit 5aefb02

Browse files
author
Freddy Kristiansen
authored
Merge pull request #2841 from freddydk/master
4.0.9
2 parents d909f75 + 209a580 commit 5aefb02

7 files changed

Lines changed: 32 additions & 14 deletions

AppHandling/Compile-AppInNavContainer.ps1

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,17 @@ try {
197197
if ("$appName" -eq "") {
198198
$appName = "$($appJsonObject.Publisher)_$($appJsonObject.Name)_$($appJsonObject.Version).app".Split([System.IO.Path]::GetInvalidFileNameChars()) -join ''
199199
}
200-
200+
if ([bool]($appJsonObject.PSobject.Properties.name -eq "id")) {
201+
AddTelemetryProperty -telemetryScope $telemetryScope -key "id" -value $appJsonObject.id
202+
}
203+
elseif ([bool]($appJsonObject.PSobject.Properties.name -eq "appid")) {
204+
AddTelemetryProperty -telemetryScope $telemetryScope -key "id" -value $appJsonObject.appid
205+
}
206+
AddTelemetryProperty -telemetryScope $telemetryScope -key "publisher" -value $appJsonObject.Publisher
207+
AddTelemetryProperty -telemetryScope $telemetryScope -key "name" -value $appJsonObject.Name
208+
AddTelemetryProperty -telemetryScope $telemetryScope -key "version" -value $appJsonObject.Version
209+
AddTelemetryProperty -telemetryScope $telemetryScope -key "appname" -value $appName
210+
201211
Write-Host "Using Symbols Folder: $appSymbolsFolder"
202212
if (!(Test-Path -Path $appSymbolsFolder -PathType Container)) {
203213
New-Item -Path $appSymbolsFolder -ItemType Directory | Out-Null
@@ -263,11 +273,13 @@ try {
263273

264274
if (([bool]($appJsonObject.PSobject.Properties.name -eq "application")) -and $appJsonObject.application)
265275
{
276+
AddTelemetryProperty -telemetryScope $telemetryScope -key "application" -value $appJsonObject.application
266277
$dependencies += @{"publisher" = "Microsoft"; "name" = "Application"; "version" = $appJsonObject.application }
267278
}
268279

269280
if (([bool]($appJsonObject.PSobject.Properties.name -eq "platform")) -and $appJsonObject.platform)
270281
{
282+
AddTelemetryProperty -telemetryScope $telemetryScope -key "platform" -value $appJsonObject.platform
271283
$dependencies += @{"publisher" = "Microsoft"; "name" = "System"; "version" = $appJsonObject.platform }
272284
}
273285

BC.HelperFunctions.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ if (!(Test-Path $configHelperFolder)) {
163163
New-Item -Path $configHelperFolder -ItemType Container -Force | Out-Null
164164
if ($isWindows -and !$isAdministrator) {
165165
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($myUsername,'FullControl', 3, 'InheritOnly', 'Allow')
166-
$acl = [System.IO.Directory]::GetAccessControl($configHelperFolder)
166+
$acl = Get-Acl -Path $configHelperFolder
167167
$acl.AddAccessRule($rule)
168-
[System.IO.Directory]::SetAccessControl($configHelperFolder,$acl)
168+
Set-Acl -Path $configHelperFolder -AclObject $acl | Out-Null
169169
}
170170
}
171171

BcContainerHelper.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ if (!(Test-Path -Path $extensionsFolder -PathType Container)) {
7373
}
7474
New-Item -Path $extensionsFolder -ItemType Container -Force | Out-Null
7575

76-
if ($isWindows -and !$isPsCore -and !$isAdministrator) {
76+
if ($isWindows -and !$isAdministrator) {
7777
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($myUsername,'FullControl', 3, 'InheritOnly', 'Allow')
78-
$acl = [System.IO.Directory]::GetAccessControl($bcContainerHelperConfig.hostHelperFolder)
78+
$acl = Get-Acl -Path $bcContainerHelperConfig.hostHelperFolder
7979
$acl.AddAccessRule($rule)
80-
[System.IO.Directory]::SetAccessControl($bcContainerHelperConfig.hostHelperFolder,$acl)
80+
Set-Acl -Path $bcContainerHelperConfig.hostHelperFolder -AclObject $acl | Out-Null
8181
}
8282
}
8383

84-
if ($isWindows -and !$isPsCore) {
84+
if ($isWindows) {
8585
. (Join-Path $PSScriptRoot "Check-BcContainerHelperPermissions.ps1")
8686
if (!$silent) {
8787
Check-BcContainerHelperPermissions -Silent

Check-BcContainerHelperPermissions.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ function Check-BcContainerHelperPermissions {
4242
Write-Host "Checking permissions to $($bcContainerHelperConfig.hostHelperFolder)"
4343
}
4444
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($myUsername,'FullControl', 3, 'InheritOnly', 'Allow')
45-
$access = [System.IO.Directory]::GetAccessControl($bcContainerHelperConfig.hostHelperFolder).Access |
46-
Where-Object { $_.IdentityReference -eq $rule.IdentityReference -and $_.FileSystemRights -eq $rule.FileSystemRights -and $_.AccessControlType -eq $rule.AccessControlType -and $_.InheritanceFlags -eq $rule.InheritanceFlags }
47-
45+
$acl = Get-Acl -Path $bcContainerHelperConfig.hostHelperFolder
46+
$access = $acl.Access | Where-Object { $_.IdentityReference -eq $rule.IdentityReference -and $_.FileSystemRights -eq $rule.FileSystemRights -and $_.AccessControlType -eq $rule.AccessControlType -and $_.InheritanceFlags -eq $rule.InheritanceFlags }
4847
if ($access) {
4948
if (!$silent) {
5049
Write-Host -ForegroundColor Green "$myUsername has the right permissions to $($bcContainerHelperConfig.hostHelperFolder)"
@@ -83,9 +82,8 @@ function Check-BcContainerHelperPermissions {
8382
Write-Host "Checking permissions to $hostsFile"
8483
}
8584
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($myUsername,'Modify', 'Allow')
86-
$access = [System.IO.Directory]::GetAccessControl($hostsFile).Access |
87-
Where-Object { $_.IdentityReference -eq $rule.IdentityReference -and $_.FileSystemRights -eq $rule.FileSystemRights -and $_.AccessControlType -eq $rule.AccessControlType }
88-
85+
$acl = Get-Acl -Path $hostsFile
86+
$access = $acl.Access | Where-Object { $_.IdentityReference -eq $rule.IdentityReference -and $_.FileSystemRights -eq $rule.FileSystemRights -and $_.AccessControlType -eq $rule.AccessControlType }
8987
if ($access) {
9088
if (!$silent) {
9189
Write-Host -ForegroundColor Green "$myUsername has the right permissions to $hostsFile"

NuGet/New-BcNuGetPackage.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ Function New-BcNuGetPackage {
171171
$XmlObjectWriter.Flush()
172172
$XmlObjectWriter.Close()
173173

174+
Write-Host "NUSPEC file:"
175+
Get-Content -path $nuspecFileName -Encoding UTF8 | Out-Host
176+
174177
$nuPkgFileName = "$($packageId)-$($packageVersion).nupkg"
175178
$nupkgFile = Join-Path ([System.IO.Path]::GetTempPath()) $nuPkgFileName
176179
if (Test-Path $nuPkgFile -PathType Leaf) {

ReleaseNotes.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
4.0.9
2+
Experimental support for PowerShell 7, please report any issues on https://github.com/microsoft/navcontainerhelper/issues.
3+
Experimantal support for running BcContainerHelper on Linux (only non-container stuff), please report any issues on https://github.com/microsoft/navcontainerhelper/issues.
4+
Adding additional properties to telemetry. Set MicrosoftTelemetryConnectionString to an empty string in settings to opt-out.
5+
16
4.0.8
27
Add parameter 'features' to Run-AlPipeline which allows for setting the compiler features
38
Add SchemaSyncMode to Publish-PerTenantExtensionApps

Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.8-dev
1+
4.0.9-dev

0 commit comments

Comments
 (0)