Skip to content

Commit c0ac293

Browse files
authored
Merge branch 'dev' into dependabot/gradle/com.squareup.okhttp3-okhttp-4.8.1
2 parents 4b6b591 + a2ef391 commit c0ac293

11 files changed

Lines changed: 182 additions & 226 deletions

‎.azure-pipelines/buildAndPackage.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ steps:
7777
SourceFolder: '$(System.DefaultWorkingDirectory)'
7878
Contents: |
7979
**/libs/*
80+
build/generated-pom.xml
81+
build/generated-pom.xml.asc
8082
build.gradle
8183
gradlew
8284
gradlew.bat

‎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"

‎Scripts/validateMavenVersion.ps1‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@
99
Retrieves the local, Maven, and Bintray versions of the Java-Core build.
1010
Checks that the Maven and Bintray versions are aligned, trigger warning if not.
1111
Checks that the current local version is greater than those currently deployed.
12+
.Parameter propertiesPath
1213
#>
1314

14-
.Parameter packageName
15-
.Parameter propertiesPath
1615

1716
Param(
18-
[parameter(Mandatory = $true)]
19-
[string]$packageName,
20-
21-
[parameter(Mandatory = $true)]
2217
[string]$propertiesPath
2318
)
2419

2520
#Find the local version from the Gradle.Properties file
21+
if($propertiesPath -eq "" -or $null -eq $propertiesPath) {
22+
$propertiesPath = Join-Path -Path $PSScriptRoot -ChildPath "../gradle.properties"
23+
}
2624
$file = get-item $propertiesPath
2725
$findLocalVersions = $file | Select-String -Pattern "mavenMajorVersion" -Context 0,2
2826
$findLocalVersions = $findLocalVersions -split "`r`n"
27+
$packageName = ($file | Select-String -Pattern "mavenArtifactId").Line.Split("=")[1].Trim()
2928

3029
$localMajor = $findLocalVersions[0].Substring($findLocalVersions[0].Length-1)
3130
$localMinor = $findLocalVersions[1].Substring($findLocalVersions[1].Length-1)
@@ -60,9 +59,9 @@ if($mavenVersion -ne $bintrayVersion){
6059
Write-Warning "The current Maven and Bintray versions are not the same"
6160
}
6261
#Success if Local version has been updated, Error otherwise.
63-
if($localVersion -gt $bintrayVersion){
62+
if($localVersion -gt $bintrayVersion -and $localVersion -gt $mavenVersion){
6463
Write-Host "The current pull request is of a greater version"
6564
}
6665
else{
6766
Write-Error "The current local version is not updated. Please update the local version in the Gradle.Properties file."
68-
}
67+
}

0 commit comments

Comments
 (0)