33
44param (
55 [string ]$Branch = " " ,
6- [string ]$PackageProjectDir = " " ,
6+ [string ]$PackageManifestPath = " " ,
77 [string ]$Publisher = " " ,
88 [string ]$WorkingDir = " " ,
99 [string ]$SecretBingMapsKey = " " ,
1010 [string ]$SecretSentry = " " ,
1111 [string ]$SecretGitHubOAuthClientId = " "
1212)
1313
14- [xml ]$xmlDoc = Get-Content " $PackageProjectDir \Package.appxmanifest "
14+ [xml ]$xmlDoc = Get-Content " $PackageManifestPath "
1515$xmlDoc.Package.Identity.Publisher = " $Publisher "
1616
1717if ($Branch -eq " Preview" )
@@ -21,10 +21,10 @@ if ($Branch -eq "Preview")
2121 $xmlDoc.Package.Properties.DisplayName = " Files - Preview"
2222 $xmlDoc.Package.Applications.Application.VisualElements.DisplayName = " Files - Preview"
2323
24- Get-ChildItem " $WorkingDir \src" - Include * .csproj, * .appxmanifest, * .wapproj, * .xaml - recurse | ForEach - Process
25- {
26- (Get-Content $_ - Raw | ForEach - Process { $_ -replace " Assets\\AppTiles\\Dev" , " Assets\AppTiles\Preview" }) |
27- Set-Content $_ - NoNewline
24+ Get-ChildItem " $WorkingDir \src" - Include * .csproj, * .appxmanifest, * .wapproj, * .xaml - recurse | ForEach - Process `
25+ { `
26+ (Get-Content $_ - Raw | ForEach - Process { $_ -replace " Assets\\AppTiles\\Dev" , " Assets\AppTiles\Preview" }) | `
27+ Set-Content $_ - NoNewline `
2828 }
2929}
3030elseif ($Branch -eq " Stable" )
@@ -34,10 +34,10 @@ elseif ($Branch -eq "Stable")
3434 $xmlDoc.Package.Properties.DisplayName = " Files"
3535 $xmlDoc.Package.Applications.Application.VisualElements.DisplayName = " Files"
3636
37- Get-ChildItem " $WorkingDir \src" - Include * .csproj, * .appxmanifest, * .wapproj, * .xaml - recurse | ForEach - Process
38- {
39- (Get-Content $_ - Raw | ForEach - Process { $_ -replace " Assets\\AppTiles\\Dev" , " Assets\AppTiles\Release" }) |
40- Set-Content $_ - NoNewline
37+ Get-ChildItem " $WorkingDir \src" - Include * .csproj, * .appxmanifest, * .wapproj, * .xaml - recurse | ForEach - Process `
38+ { `
39+ (Get-Content $_ - Raw | ForEach - Process { $_ -replace " Assets\\AppTiles\\Dev" , " Assets\AppTiles\Release" }) | `
40+ Set-Content $_ - NoNewline `
4141 }
4242}
4343elseif ($Branch -eq " Store" )
@@ -54,29 +54,29 @@ elseif ($Branch -eq "Store")
5454 $pm = $xmlDoc.SelectSingleNode (" /pkg:Package/pkg:Capabilities/rescap:Capability[@Name='packageManagement']" , $nsmgr )
5555 $xmlDoc.Package.Capabilities.RemoveChild ($pm )
5656
57- Get-ChildItem " $WorkingDir \src" - Include * .csproj, * .appxmanifest, * .wapproj, * .xaml - recurse | ForEach - Process
58- {
59- (Get-Content $_ - Raw | ForEach - Process { $_ -replace " Assets\\AppTiles\\Dev" , " Assets\AppTiles\Release" }) |
60- Set-Content $_ - NoNewline
57+ Get-ChildItem " $WorkingDir \src" - Include * .csproj, * .appxmanifest, * .wapproj, * .xaml - recurse | ForEach - Process `
58+ { `
59+ (Get-Content $_ - Raw | ForEach - Process { $_ -replace " Assets\\AppTiles\\Dev" , " Assets\AppTiles\Release" }) | `
60+ Set-Content $_ - NoNewline `
6161 }
6262}
6363
64- $xmlDoc.Save (" $PackageProjectDir \Package.appxmanifest " )
64+ $xmlDoc.Save (" $PackageManifestPath " )
6565
66- Get-ChildItem " $WorkingDir \src" - Include * .cs - recurse | ForEach-Object - Process
67- {
68- (Get-Content $_ - Raw | ForEach-Object - Process { $_ -replace " bingmapskey.secret" , " $SecretBingMapsKey " }) |
69- Set-Content $_ - NoNewline
66+ Get-ChildItem " $WorkingDir \src" - Include * .cs - recurse | ForEach-Object - Process `
67+ { `
68+ (Get-Content $_ - Raw | ForEach-Object - Process { $_ -replace " bingmapskey.secret" , " $SecretBingMapsKey " }) | `
69+ Set-Content $_ - NoNewline `
7070}
7171
72- Get-ChildItem " $WorkingDir \src" - Include * .cs - recurse | ForEach-Object - Process
72+ Get-ChildItem " $WorkingDir \src" - Include * .cs - recurse | ForEach-Object - Process `
7373{
74- (Get-Content $_ - Raw | ForEach-Object - Process { $_ -replace " sentry.secret" , " $SecretSentry " }) |
75- Set-Content $_ - NoNewline
74+ (Get-Content $_ - Raw | ForEach-Object - Process { $_ -replace " sentry.secret" , " $SecretSentry " }) | `
75+ Set-Content $_ - NoNewline `
7676}
7777
78- Get-ChildItem " $WorkingDir \src" - Include * .cs - recurse | ForEach-Object - Process
79- {
80- (Get-Content $_ - Raw | ForEach-Object - Process { $_ -replace " githubclientid.secret" , " $SecretGitHubOAuthClientId " }) |
81- Set-Content $_ - NoNewline
78+ Get-ChildItem " $WorkingDir \src" - Include * .cs - recurse | ForEach-Object - Process `
79+ { `
80+ (Get-Content $_ - Raw | ForEach-Object - Process { $_ -replace " githubclientid.secret" , " $SecretGitHubOAuthClientId " }) | `
81+ Set-Content $_ - NoNewline `
8282}
0 commit comments