Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pipelines/store/PDPs/PDP/en-US/PDP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<!-- _locComment_text="{MaxLength=30} App keyword 7" -->Scripting</Keyword>
</Keywords>
<Description _locID="App_Description">
<!-- _locComment_text="{MaxLength=10000} {Locked=Windows} App Description" -->PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate task that manage operating systems (Linux, macOS, and Windows) and processes.
<!-- _locComment_text="{MaxLength=10000} {Locked=___VERSION___}{Locked=Windows} App Description" -->Version: ___VERSION___

PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate task that manage operating systems (Linux, macOS, and Windows) and processes.

PowerShell commands let you manage computers from the command line. PowerShell providers let you access data stores, such as the registry and certificate store, as easily as you access the file system. PowerShell includes a rich expression parser and a fully developed scripting language.

Expand All @@ -44,9 +46,7 @@ PowerShell is Open Source. See https://github.com/powershell/powershell </Descr
<!-- _locComment_text="{MaxLength=255} App DevStudio" -->
</DevStudio>
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=___VERSION___}{Locked=___CHANGELOGLINK___} App Release Note" -->Version: ___VERSION___

Changelog: ___CHANGELOGLINK___</ReleaseNotes>
<!-- _locComment_text="{MaxLength=1500} {Locked=___CHANGELOGLINK___} App Release Note" -->Changelog: ___CHANGELOGLINK___</ReleaseNotes>
<AppFeatures>
<!-- Valid length: 200 character limit, up to 20 elements -->
<AppFeature _locID="App_feature1">
Expand Down
38 changes: 24 additions & 14 deletions .pipelines/templates/release-MSIX-Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,37 +57,47 @@ jobs:
$jsonPath = "$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json"
$json = Get-Content $jsonPath -Raw | ConvertFrom-Json
$releaseNoteVariables = @{
'___VERSION___' = $tagString
'___CHANGELOGLINK___' = $changelogLink
}
$listingProperties = @($json.listings.PSObject.Properties)
if ($listingProperties.Count -eq 0) {
throw "Store listings are missing from '$jsonPath'."
}
foreach ($listingProperty in $listingProperties) {
$language = $listingProperty.Name
$releaseNotes = $listingProperty.Value.baseListing.releaseNotes
$baseListing = $listingProperty.Value.baseListing
$description = $baseListing.description
if ([string]::IsNullOrWhiteSpace($description)) {
throw "Store description for '$language' is missing from '$jsonPath'."
}
$releaseNotes = $baseListing.releaseNotes
if ([string]::IsNullOrWhiteSpace($releaseNotes)) {
throw "Store release notes for '$language' are missing from '$jsonPath'."
}
foreach ($placeholder in $releaseNoteVariables.Keys) {
if (-not $releaseNotes.Contains($placeholder)) {
throw "Store release notes for '$language' do not contain the required placeholder '$placeholder'."
}
$releaseNotes = $releaseNotes.Replace($placeholder, $releaseNoteVariables[$placeholder])
# Localized listings may retain the version in release notes until localization propagates the en-US change.
if ($description.Contains('___VERSION___')) {
$baseListing.description = $description.Replace('___VERSION___', $tagString)
}
elseif ($releaseNotes.Contains('___VERSION___')) {
$releaseNotes = $releaseNotes.Replace('___VERSION___', $tagString)
}
else {
throw "Store listing for '$language' does not contain the required placeholder '___VERSION___'."
}
if (-not $releaseNotes.Contains('___CHANGELOGLINK___')) {
throw "Store release notes for '$language' do not contain the required placeholder '___CHANGELOGLINK___'."
}
$baseListing.releaseNotes = $releaseNotes.Replace('___CHANGELOGLINK___', $changelogLink)
$listingProperty.Value.baseListing.releaseNotes = $releaseNotes
Write-Verbose -Verbose "Release notes for '$language':"
Write-Verbose -Verbose $releaseNotes
Write-Verbose -Verbose $baseListing.releaseNotes
}
$json | ConvertTo-Json -Depth 100 | Set-Content $jsonPath -Encoding UTF8
displayName: 'Set Store Release Note Variables'
displayName: 'Set Store Listing Variables'

- task: PowerShell@2
condition: or(eq(variables['LTS'], 'true'), eq(variables['STABLE'], 'true'), eq(variables['PREVIEW'], 'true'))
Expand Down
Loading