Skip to content

Commit 777f6c8

Browse files
authored
Create CreateRegistryEntry.ps1 (Azure#2804)
1 parent 7214374 commit 777f6c8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tools/CreateRegistryEntry.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# e.g. .\CreateRegistryEntry.ps1 2.0.0 2016_07_11 2016_08_08 "Path to shared PS files" "Path to signed PS build artifacts"
2+
[CmdletBinding()]
3+
Param(
4+
[Parameter(Mandatory=$True, Position=0)]
5+
[String]$PSVersion,
6+
[Parameter(Mandatory=$True, Position=1)]
7+
[String]$LastRelease,
8+
[Parameter(Mandatory=$True, Position=2)]
9+
[String]$CurrentRelease,
10+
[Parameter(Mandatory=$True, Position=3)]
11+
[String]$PathToShared,
12+
[Parameter(Mandatory=$True, Position=4)]
13+
[String]$PathToBuildArtifacts
14+
)
15+
16+
$PathToLastRelease = "$PathToShared\$($LastRelease)_PowerShell"
17+
$PathToCurrentRelease = "$PathToShared\$($CurrentRelease)_PowerShell"
18+
19+
New-Item $PathToCurrentRelease -Type Directory > $null
20+
New-Item "$PathToCurrentRelease\pkgs" -Type Directory > $null
21+
Copy-Item "$PathToLastRelease\scripts" "$PathToCurrentRelease" -Recurse
22+
Copy-Item "$PathToLastRelease\removewebpiReg.reg" "$PathToCurrentRelease"
23+
Copy-Item "$PathToLastRelease\webpiReg.reg" "$PathToCurrentRelease"
24+
Copy-Item "$PathToLastRelease\wpilauncher.exe" "$PathToCurrentRelease"
25+
26+
Copy-Item "$PathToBuildArtifacts\signed\AzurePowerShell.msi" "$PathToCurrentRelease"
27+
Copy-Item "$PathToBuildArtifacts\src\Package\*.nupkg" "$PathToCurrentRelease\pkgs"
28+
29+
Rename-Item $PathToCurrentRelease\AzurePowerShell.msi azure-powershell.$PSVersion.msi
30+
31+
(Get-Content $PathToCurrentRelease\webpiReg.reg) -replace $LastRelease, $CurrentRelease | Set-Content $PathToCurrentRelease\webpiReg.reg

0 commit comments

Comments
 (0)