Skip to content

Commit 2673a37

Browse files
committed
strip suffix from current veresion
1 parent e5f1103 commit 2673a37

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/find_breaking_changes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)