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
Empty file.
27 changes: 3 additions & 24 deletions .pipelines/store/PDPs/PDP/en-US/PDP.xml
Original file line number Diff line number Diff line change
@@ -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">
Comment thread
jshigetomi marked this conversation as resolved.
<!-- 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">
Expand Down Expand Up @@ -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">
Expand Down
2 changes: 0 additions & 2 deletions .pipelines/store/SBConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"qps-ploca",
"qps-plocm"
],
"MediaRootPath": "",
"MediaFallbackLanguage": "en-US",
"PackagePath": [],
"OutPath": "",
"OutName": "",
Expand Down
39 changes: 5 additions & 34 deletions .pipelines/templates/package-store-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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/PDPs/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) {
Expand Down Expand Up @@ -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:"
Expand All @@ -209,7 +178,8 @@ jobs:
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/PDP'
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/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/PDPs/PDP'

- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
displayName: 'Create StoreBroker Package (Stable/LTS)'
Expand All @@ -221,7 +191,8 @@ jobs:
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/PDP'
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/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/PDPs/PDP'

- pwsh: |
$outputDirectory = "$(ob_outputDirectory)"
Expand Down
39 changes: 29 additions & 10 deletions .pipelines/templates/release-MSIX-Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

$listingProperties = @($json.listings.PSObject.Properties)
if ($listingProperties.Count -eq 0) {
throw "Store listings are missing from '$jsonPath'."
}

# 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"
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'))
Expand Down
13 changes: 13 additions & 0 deletions assets/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@

<Resources>
<Resource Language="en-US"/>
<Resource Language="cs"/>
<Resource Language="de"/>
<Resource Language="es"/>
<Resource Language="fr"/>
<Resource Language="it"/>
<Resource Language="ja"/>
<Resource Language="ko"/>
<Resource Language="pl"/>
<Resource Language="pt-BR"/>
<Resource Language="ru"/>
<Resource Language="tr"/>
<Resource Language="zh-Hans"/>
<Resource Language="zh-Hant"/>
</Resources>

<Applications>
Expand Down
Loading