Skip to content

Commit

Permalink
Update ver scanner and spring pom files (#13645)
Browse files Browse the repository at this point in the history
  • Loading branch information
JimSuplizio authored Jul 30, 2020
1 parent 8ea6bb9 commit 883a59a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion eng/versioning/pom_file_version_scanner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function Test-Dependency-Tag-And-Version {
{
if (!$libHash.ContainsKey($depKey))
{
return "Error: library dependency '$($depKey)' does not exist in any of the version_*.txt files. Please ensure the dependency type is correct or the dependency is added to the appropriate file."
return "Error: $($depKey)'s dependency type is '$($depType)' but the dependency does not exist in any of the version_*.txt files. Should this be an external_dependency? Please ensure the dependency type is correct or the dependency is added to the appropriate file."
}
else
{
Expand Down Expand Up @@ -671,10 +671,18 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object {
}
else
{
# If the tag isn't external_dependency then verify it exists in the library hash
if (!$libHash.ContainsKey($depKey))
{
$script:FoundError = $true
return "Error: $($depKey)'s dependency type is '$($depType)' but the dependency does not exist in any of the version_*.txt files. Should this be an external_dependency? Please ensure the dependency type is correct or the dependency is added to the appropriate file."

}
if ($depType -eq $DependencyTypeDependency)
{
if ($versionWithoutBraces -ne $libHash[$depKey].depVer)
{
$script:FoundError = $true
return "Error: $($depKey)'s <version> is '$($versionString)' but the dependency version is listed as $($libHash[$depKey].depVer)"
}
}
Expand All @@ -683,10 +691,12 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object {
# Verify that none of the 'current' dependencies are using a groupId that starts with 'unreleased_' or 'beta_'
if ($depKey.StartsWith('unreleased_') -or $depKey.StartsWith('beta_'))
{
$script:FoundError = $true
return "Error: $($versionUpdateString) is using an unreleased_ or beta_ dependency and trying to set current value. Only dependency versions can be set with an unreleased or beta dependency."
}
if ($versionWithoutBraces -ne $libHash[$depKey].curVer)
{
$script:FoundError = $true
return "Error: $($depKey)'s <version> is '$($versionString)' but the current version is listed as $($libHash[$depKey].curVer)"
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/spring/azure-spring-cloud-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<includes>
<include>com.microsoft.azure:spring-cloud-azure-telemetry:[1.2.8-beta.1]</include> <!-- {x-include-update;com.microsoft.azure:spring-cloud-azure-telemetry;current} -->
<include>com.microsoft.azure:azure:[1.34.0]</include> <!-- {x-include-update;spring_com.microsoft.azure:azure;external_dependency} -->
<include>commons-io:commons-io:[2.5]</include> <!-- {x-include-update;commons-io:commons-io;current} -->
<include>commons-io:commons-io:[2.5]</include> <!-- {x-include-update;commons-io:commons-io;external_dependency} -->
<include>org.springframework:spring-context:[5.2.6.RELEASE]</include> <!-- {x-include-update;org.springframework:spring-context;external_dependency} -->
<include>org.springframework:spring-context-support:[5.2.6.RELEASE]</include> <!-- {x-include-update;org.springframework:spring-context-support;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter-aop:[2.3.0.RELEASE]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter-aop;external_dependency} -->
Expand Down
2 changes: 1 addition & 1 deletion sdk/spring/azure-spring-cloud-telemetry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<bannedDependencies>
<includes>
<include>com.microsoft.azure:azure:[1.34.0]</include> <!-- {x-include-update;spring_com.microsoft.azure:azure;external_dependency} -->
<include>commons-io:commons-io:[2.5]</include> <!-- {x-include-update;commons-io:commons-io;current} -->
<include>commons-io:commons-io:[2.5]</include> <!-- {x-include-update;commons-io:commons-io;external_dependency} -->
<include>org.springframework:spring-web:[5.2.6.RELEASE]</include> <!-- {x-include-update;org.springframework:spring-web;external_dependency} -->
<include>org.springframework:spring-context:[5.2.6.RELEASE]</include> <!-- {x-include-update;org.springframework:spring-context;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter-aop:[2.3.0.RELEASE]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter-aop;external_dependency} -->
Expand Down

0 comments on commit 883a59a

Please sign in to comment.