2023-07-14 19:38:11 +03:00
|
|
|
param (
|
|
|
|
[string]
|
|
|
|
$versionSuffix
|
|
|
|
)
|
|
|
|
|
|
|
|
$versionSuffix = $versionSuffix.TrimStart("-")
|
|
|
|
if ($versionSuffix -eq "") {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
# Get current script directory
|
2023-08-23 22:33:14 +03:00
|
|
|
$appCsProjPath = Join-Path -Path $PSScriptRoot -ChildPath "../src/kiota/kiota.csproj"
|
|
|
|
$builderCsProjPath = Join-Path -Path $PSScriptRoot -ChildPath "../src/Kiota.Builder/Kiota.Builder.csproj"
|
2023-07-14 19:38:11 +03:00
|
|
|
|
|
|
|
#load xml from csproj
|
|
|
|
$appCsProj = [xml](Get-Content $appCsProjPath)
|
|
|
|
$builderCsProj = [xml](Get-Content $builderCsProjPath)
|
|
|
|
|
|
|
|
#update version suffix
|
|
|
|
$appCsProj.Project.PropertyGroup[0].VersionSuffix = $versionSuffix
|
|
|
|
$builderCsProj.Project.PropertyGroup[0].VersionSuffix = $versionSuffix
|
|
|
|
|
|
|
|
#save xml to csproj
|
|
|
|
$appCsProj.Save($appCsProjPath)
|
|
|
|
$builderCsProj.Save($builderCsProjPath)
|