File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,17 @@ def get_current_version_from_gradle():
1616 with open ("dependencyManagement/build.gradle.kts" , "r" , encoding = "utf-8" ) as file :
1717 content = file .read ()
1818
19- # Extract otelVersion (instrumentation version)
19+ # Extract otelVersion (instrumentation version) and strip -adot1 suffix
2020 otel_version_match = re .search (r'val otelVersion = "([^"]*)"' , content )
2121 current_instrumentation_version = otel_version_match .group (1 ) if otel_version_match else None
22+ if current_instrumentation_version and current_instrumentation_version .endswith ("-adot1" ):
23+ current_instrumentation_version = current_instrumentation_version [:- 6 ] # Remove -adot1
2224
23- # Extract contrib version from dependency line
25+ # Extract contrib version from dependency line and strip -adot1 suffix
2426 contrib_match = re .search (r'"io\.opentelemetry\.contrib:opentelemetry-aws-xray:([^"]*)",' , content )
2527 current_contrib_version = contrib_match .group (1 ) if contrib_match else None
28+ if current_contrib_version and current_contrib_version .endswith ("-adot1" ):
29+ current_contrib_version = current_contrib_version [:- 6 ] # Remove -adot1
2630
2731 return current_instrumentation_version , current_contrib_version
2832
You can’t perform that action at this time.
0 commit comments