Update to 3.5.6 and for components
This commit is contained in:
20
VersionChecker/setbuild.ps1
Normal file
20
VersionChecker/setbuild.ps1
Normal file
@@ -0,0 +1,20 @@
|
||||
# Fetch the version from EscapeFromTarkov.exe
|
||||
$tarkovPath = 'F:\SPT-AKI\EscapeFromTarkov.exe'
|
||||
$tarkovVersion = (Get-Item -Path $tarkovPath).VersionInfo.FileVersionRaw.Revision
|
||||
Write-Host "Current version of EscapeFromTarkov.exe is: $tarkovVersion"
|
||||
|
||||
# Update AssemblyVersion
|
||||
$assemblyPath = '{0}\..\Properties\AssemblyInfo.cs' -f $PSScriptRoot
|
||||
$versionPattern = '^\[assembly: TarkovVersion\(.*\)\]'
|
||||
(Get-Content $assemblyPath) | ForEach-Object {
|
||||
if ($_ -match $versionPattern){
|
||||
$versionType = $matches[1]
|
||||
$newLine = '[assembly: TarkovVersion({0})]' -f $tarkovVersion
|
||||
Write-Host "Changed the line from '$_' to '$newLine'"
|
||||
$newLine
|
||||
} else {
|
||||
$_
|
||||
}
|
||||
} | Set-Content $assemblyPath
|
||||
|
||||
Write-Host "AssemblyInfo.cs updated successfully!"
|
||||
Reference in New Issue
Block a user