From 373ffeb7ed3ce31e343e67609f4af771b54a0711 Mon Sep 17 00:00:00 2001 From: Volosoft Agent <43883821+voloagent@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:48:09 +0300 Subject: [PATCH] add Get-Current-Version & Get-Current-Branch --- nupkg/common.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 2ba7e15a16..facff2f25a 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -38,6 +38,16 @@ function Seperator Write-Host ("_" * 100) -ForegroundColor gray } +function Get-Current-Version { + $commonPropsFilePath = resolve-path "../common.props" + $commonPropsXmlCurrent = [xml](Get-Content $commonPropsFilePath ) + $currentVersion = $commonPropsXmlCurrent.Project.PropertyGroup.Version.Trim() + return $currentVersion +} + +function Get-Current-Branch { + return git branch --show-current +} function Read-File { param(