Skip to content

Commit

Permalink
add Get-Current-Version & Get-Current-Branch
Browse files Browse the repository at this point in the history
  • Loading branch information
voloagent committed Jan 26, 2022
1 parent 7a53ca4 commit 373ffeb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nupkg/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 373ffeb

Please sign in to comment.