Skip to content

Commit 4bacea5

Browse files
committed
- fixes a bug where parameters docs would fail the script
1 parent 509ad9a commit 4bacea5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Scripts/getLatestVersion.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
.Description
88
Retrieves the latest version specified in the Gradle.Properties file
99
Uses the retrieved values to update the enviornment variable VERSION_STRING
10-
#>
11-
1210
.Parameter propertiesPath
13-
11+
#>
1412
Param(
15-
[parameter(Mandatory = $true)]
1613
[string]$propertiesPath
1714
)
1815

1916
#Retrieve the current version from the Gradle.Properties file given the specified path
17+
if($propertiesPath -eq "" -or $null -eq $propertiesPath) {
18+
$propertiesPath = Join-Path -Path $PSScriptRoot -ChildPath "../gradle.properties"
19+
}
2020
$file = get-item $propertiesPath
2121
$findVersions = $file | Select-String -Pattern "mavenMajorVersion" -Context 0,2
2222
$findVersions = $findVersions -split "`r`n"

0 commit comments

Comments
 (0)