mirror of
https://github.com/MUnique/OpenMU
synced 2026-08-15 14:32:19 -04:00
10 lines
421 B
PowerShell
10 lines
421 B
PowerShell
$versionPattern = '^\[assembly: AssemblyVersion\("(.*)"\)\]'
|
|
$path = '.\src\SharedAssemblyInfo.cs'
|
|
|
|
(Get-Content $path) | ForEach-Object{
|
|
if($_ -match $versionPattern){
|
|
$projectVersion = [version]$matches[1]
|
|
$versionString = "{0}.{1}.{2}" -f $projectVersion.Major, $projectVersion.Minor, $projectVersion.Build
|
|
Write-Host "##vso[task.setvariable variable=projectVersion]$versionString"
|
|
}
|
|
}
|