File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 1717
1818param (
1919 [Parameter (Mandatory = $false )]
20- [string ]$BuildPropsPath = ( Join-Path $PSScriptRoot " .. " " Directory.Build.props " ) ,
21-
20+ [string ]$BuildPropsPath ,
21+
2222 [Parameter (Mandatory = $false )]
2323 [ValidateSet (" Simple" , " Detailed" )]
2424 [string ]$Format = " Detailed"
2525)
2626
27+ # Set default path if not provided
28+ if (-not $BuildPropsPath ) {
29+ $BuildPropsPath = Join-Path $PSScriptRoot " .." " Directory.Build.props"
30+ }
31+
2732function Get-Version {
2833 param ([string ]$FilePath )
2934
Original file line number Diff line number Diff line change @@ -21,11 +21,16 @@ param(
2121 [Parameter (Mandatory = $false )]
2222 [ValidateSet (" Major" , " Minor" , " Patch" )]
2323 [string ]$IncrementType = " Patch" ,
24-
24+
2525 [Parameter (Mandatory = $false )]
26- [string ]$BuildPropsPath = ( Join-Path $PSScriptRoot " .. " " Directory.Build.props " )
26+ [string ]$BuildPropsPath
2727)
2828
29+ # Set default path if not provided
30+ if (-not $BuildPropsPath ) {
31+ $BuildPropsPath = Join-Path $PSScriptRoot " .." " Directory.Build.props"
32+ }
33+
2934function Get-CurrentVersion {
3035 param ([string ]$FilePath )
3136
Original file line number Diff line number Diff line change 1818param (
1919 [Parameter (Mandatory = $true )]
2020 [string ]$Version ,
21-
21+
2222 [Parameter (Mandatory = $false )]
23- [string ]$BuildPropsPath = ( Join-Path $PSScriptRoot " .. " " Directory.Build.props " )
23+ [string ]$BuildPropsPath
2424)
2525
26+ # Set default path if not provided
27+ if (-not $BuildPropsPath ) {
28+ $BuildPropsPath = Join-Path $PSScriptRoot " .." " Directory.Build.props"
29+ }
30+
2631function Validate-Version {
2732 param ([string ]$Version )
2833
You can’t perform that action at this time.
0 commit comments