-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetVer.ps1
More file actions
24 lines (18 loc) · 1.4 KB
/
Copy pathSetVer.ps1
File metadata and controls
24 lines (18 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Write-Host "Enter a new version:"
$newVer = Read-Host
$lineVer = Get-Content -Path .\SNLLua\SNLMain.lua | Select-String -Pattern "\..\..\."
$oldVer = $lineVer -replace ".* v", "" -replace "`".*", ""
$newLine = $lineVer -replace $oldVer, $newVer
(Get-Content -Path .\SNLLua\SNLMain.lua) -replace $lineVer, $newLine | Set-Content -Path .\SNLLua\SNLMain.lua
$lineVer = (Get-Content -Path .\SNLLua\version.txt)[1]
$oldVer = $lineVer -replace "v", ""
$newLine = $lineVer -replace $oldVer, $newVer
(Get-Content -Raw -Path .\SNLLua\version.txt) -replace $lineVer, $newLine | Set-Content -NoNewline -Path .\SNLLua\version.txt
$lineVer = Get-Content -Path .\SNLSyncSource\UDPBDG\UDPBDG.csproj | Select-String -Pattern "<AssemblyVersion>"
$oldVer = $lineVer -replace ".*<AssemblyVersion>", "" -replace "</.*", ""
$newLine = $lineVer -replace $oldVer, $newVer
(Get-Content -Path .\SNLSyncSource\UDPBDG\UDPBDG.csproj) -replace $lineVer, $newLine | Set-Content -Encoding UTF8 -Path .\SNLSyncSource\UDPBDG\UDPBDG.csproj
$lineVer = Get-Content -Path .\SNLSyncSource\SNL-CLI\SNL-CLI.csproj | Select-String -Pattern "<AssemblyVersion>"
$oldVer = $lineVer -replace ".*<AssemblyVersion>", "" -replace "</.*", ""
$newLine = $lineVer -replace $oldVer, $newVer
(Get-Content -Path .\SNLSyncSource\SNL-CLI\SNL-CLI.csproj) -replace $lineVer, $newLine | Set-Content -Encoding UTF8 -Path .\SNLSyncSource\SNL-CLI\SNL-CLI.csproj