mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-14 05:39:11 +00:00
[release/v7.5.12] Simplify Microsoft Store listing metadata (#28063)
This commit is contained in:
1 parent
3f6e39b139
commit
4482ba3ec6
5 files changed
+38
-71
No files matched your search
@@ -1,12 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProductDescription language="en-us" xmlns="http://schemas.microsoft.com/appx/2012/ProductDescription" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en-us" Release="">
|
||||
<AppStoreName _locID="PowerShell-Private">
|
||||
<!-- This is optional. AppStoreName is typically extracted from your package's AppxManifest DisplayName property. -->
|
||||
<!-- Uncomment (and localize) this Store name if your application package does not contain a localization for the DisplayName in this language. -->
|
||||
<!-- Leaving this uncommented for a language that your application package DOES contain a DisplayName for will result in a submission failure with the API. -->
|
||||
<!-- _locComment_text="{MaxLength=200} App AppStoreName" -->
|
||||
<!-- Dev Home -->
|
||||
</AppStoreName>
|
||||
<Keywords>
|
||||
<!-- Valid length: 30 character limit, up to 7 elements -->
|
||||
<Keyword _locID="App_keyword1">
|
||||
@@ -51,23 +44,9 @@ 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_NUMBER__} App Release Note" -->Please see our GitHub releases page for additional details.</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
<!-- Valid attributes: any of DesktopImage, MobileImage, XboxImage, SurfaceHubImage, and HoloLensImage -->
|
||||
</ScreenshotCaptions>
|
||||
<AdditionalAssets>
|
||||
<!-- Valid elements:-->
|
||||
<!-- HeroImage414x180, HeroImage846x468, HeroImage558x756, HeroImage414x468, HeroImage558x558, HeroImage2400x1200,-->
|
||||
<!-- ScreenshotWXGA, ScreenshotHD720, ScreenshotWVGA, Doublewide, Panoramic, Square,-->
|
||||
<!-- SmallMobileTile, SmallXboxLiveTile, LargeMobileTile, LargeXboxLiveTile, Tile,-->
|
||||
<!-- DesktopIcon, Icon (use this value for the 1:1 300x300 pixels logo), AchievementIcon,-->
|
||||
<!-- ChallengePromoIcon, RewardDisplayIcon, Icon150X150, Icon71X71,-->
|
||||
<!-- BoxArt, BrandedKeyArt, PosterArt, FeaturedPromotionalArt, PromotionalArt16x9, TitledHeroArt-->
|
||||
<!-- There is no content for any of these elements, just a single attribute called FileName. -->
|
||||
</AdditionalAssets>
|
||||
<Trailers>
|
||||
</Trailers>
|
||||
<!-- _locComment_text="{MaxLength=1500} {Locked=___VERSION___}{Locked=___CHANGELOGLINK___} App Release Note" -->Version: ___VERSION___
|
||||
|
||||
Changelog: ___CHANGELOGLINK___</ReleaseNotes>
|
||||
<AppFeatures>
|
||||
<!-- Valid length: 200 character limit, up to 20 elements -->
|
||||
<AppFeature _locID="App_feature1">
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
"qps-ploca",
|
||||
"qps-plocm"
|
||||
],
|
||||
"MediaRootPath": "",
|
||||
"MediaFallbackLanguage": "en-US",
|
||||
"PackagePath": [],
|
||||
"OutPath": "",
|
||||
"OutName": "",
|
||||
|
||||
@@ -57,19 +57,16 @@ jobs:
|
||||
# Define app configurations for each channel
|
||||
$channelConfigs = @{
|
||||
'LTS' = @{
|
||||
AppStoreName = 'PowerShell-LTS'
|
||||
ProductId = '$(productId-LTS)'
|
||||
AppId = '$(AppID-LTS)'
|
||||
ServiceEndpoint = "StoreAppPublish-Stable"
|
||||
}
|
||||
'Stable' = @{
|
||||
AppStoreName = 'PowerShell'
|
||||
ProductId = '$(productId-Stable)'
|
||||
AppId = '$(AppID-Stable)'
|
||||
ServiceEndpoint = "StoreAppPublish-Stable"
|
||||
}
|
||||
'Preview' = @{
|
||||
AppStoreName = 'PowerShell (Preview)'
|
||||
ProductId = '$(productId-Preview)'
|
||||
AppId = '$(AppID-Preview)'
|
||||
ServiceEndpoint = "StoreAppPublish-Preview"
|
||||
@@ -100,36 +97,8 @@ jobs:
|
||||
|
||||
$config = $channelConfigs[$currentChannel]
|
||||
Write-Verbose -Verbose "Selected channel: $currentChannel"
|
||||
Write-Verbose -Verbose "App Store Name: $($config.AppStoreName)"
|
||||
Write-Verbose -Verbose "Product ID: $($config.ProductId)"
|
||||
|
||||
# Update PDP.xml file
|
||||
$pdpPath = '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP/en-US/PDP.xml'
|
||||
if (Test-Path $pdpPath) {
|
||||
Write-Verbose -Verbose "Updating PDP file: $pdpPath"
|
||||
|
||||
[xml]$pdpXml = Get-Content $pdpPath -Raw
|
||||
|
||||
# Create namespace manager for XML with default namespace
|
||||
$nsManager = New-Object System.Xml.XmlNamespaceManager($pdpXml.NameTable)
|
||||
$nsManager.AddNamespace("pd", "http://schemas.microsoft.com/appx/2012/ProductDescription")
|
||||
|
||||
$appStoreNameElement = $pdpXml.SelectSingleNode("//pd:AppStoreName", $nsManager)
|
||||
if ($appStoreNameElement) {
|
||||
$appStoreNameElement.SetAttribute("_locID", $config.AppStoreName)
|
||||
Write-Verbose -Verbose "Updated AppStoreName _locID to: $($config.AppStoreName)"
|
||||
} else {
|
||||
Write-Warning "AppStoreName element not found in PDP file"
|
||||
}
|
||||
|
||||
$pdpXml.Save($pdpPath)
|
||||
Write-Verbose -Verbose "PDP file updated successfully"
|
||||
Get-Content -Path $pdpPath | Write-Verbose -Verbose
|
||||
} else {
|
||||
Write-Error "PDP file not found: $pdpPath"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Update SBConfig.json file
|
||||
$sbConfigPath = '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/SBConfig.json'
|
||||
if (Test-Path $sbConfigPath) {
|
||||
@@ -190,7 +159,7 @@ jobs:
|
||||
|
||||
Write-Verbose -Verbose "Variables set successfully"
|
||||
name: UpdateConfigs
|
||||
displayName: Update PDPs and SBConfig.json
|
||||
displayName: Update SBConfig.json and Store Variables
|
||||
|
||||
- pwsh: |
|
||||
Write-Verbose -Verbose "Checking variables after UpdateConfigs:"
|
||||
@@ -209,7 +178,8 @@ jobs:
|
||||
contents: '*.msixBundle'
|
||||
outSBName: 'PowerShellStorePackage'
|
||||
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
|
||||
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
|
||||
# StoreBroker v3 requires a media root with a PDP root, even when the PDP has no media.
|
||||
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
|
||||
|
||||
- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
|
||||
displayName: 'Create StoreBroker Package (Stable/LTS)'
|
||||
@@ -221,7 +191,8 @@ jobs:
|
||||
contents: '*.msixBundle'
|
||||
outSBName: 'PowerShellStorePackage'
|
||||
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
|
||||
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
|
||||
# StoreBroker v3 requires a media root with a PDP root, even when the PDP has no media.
|
||||
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
|
||||
|
||||
- pwsh: |
|
||||
$outputDirectory = "$(ob_outputDirectory)"
|
||||
|
||||
@@ -52,23 +52,42 @@ jobs:
|
||||
}
|
||||
|
||||
$endURL = $tagString -replace '^v','' -replace '\.',''
|
||||
$message = "Changelog: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
|
||||
$changelogLink = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
|
||||
Write-Verbose -Verbose "Release Notes for the Store:"
|
||||
Write-Verbose -Verbose "$message"
|
||||
$jsonPath = "$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json"
|
||||
$json = Get-Content $jsonPath -Raw | ConvertFrom-Json
|
||||
|
||||
$json.listings.'en-us'.baseListing.releaseNotes = $message
|
||||
$releaseNoteVariables = @{
|
||||
'___VERSION___' = $tagString
|
||||
'___CHANGELOGLINK___' = $changelogLink
|
||||
}
|
||||
|
||||
# Add PowerShell version to the top of the description
|
||||
$description = $json.listings.'en-us'.baseListing.description
|
||||
$version = "$(ReleaseTag)"
|
||||
$updatedDescription = "Version: $version`n`n$description"
|
||||
$json.listings.'en-us'.baseListing.description = $updatedDescription
|
||||
Write-Verbose -Verbose "Updated description: $updatedDescription"
|
||||
$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
|
||||
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])
|
||||
}
|
||||
|
||||
$listingProperty.Value.baseListing.releaseNotes = $releaseNotes
|
||||
Write-Verbose -Verbose "Release notes for '$language':"
|
||||
Write-Verbose -Verbose $releaseNotes
|
||||
}
|
||||
|
||||
$json | ConvertTo-Json -Depth 100 | Set-Content $jsonPath -Encoding UTF8
|
||||
displayName: 'Add Changelog Link and Version Number to SBJSON'
|
||||
displayName: 'Set Store Release Note Variables'
|
||||
|
||||
- task: PowerShell@2
|
||||
condition: or(eq(variables['LTS'], 'true'), eq(variables['STABLE'], 'true'), eq(variables['PREVIEW'], 'true'))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="en-us"/>
|
||||
<Resource Language="en-US"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
|
||||
Reference in new issue
Block a user