Skip to content

Commit 11795cd

Browse files
committed
optimistic
1 parent 0333f61 commit 11795cd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

opamp-client/build.gradle.kts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,8 @@ abstract class DownloadOpampProtos @Inject constructor(
5353
val redirectLocation = connection.getHeaderField("Location")
5454
connection.disconnect()
5555

56-
val latestTag = if (redirectLocation != null && redirectLocation.contains("/releases/tag/")) {
57-
// Extract tag from URL like: https://github.com/open-telemetry/opamp-spec/releases/tag/v0.12.0
58-
redirectLocation.substringAfterLast("/")
59-
} else {
60-
throw RuntimeException("Could not determine latest release tag from redirect. Redirect location: $redirectLocation")
61-
}
56+
// Extract tag from URL like: https://github.com/open-telemetry/opamp-spec/releases/tag/v0.12.0
57+
val latestTag = redirectLocation.substringAfterLast("/")
6258
// Download the source code for the latest release
6359
val zipUrl = "https://github.com/open-telemetry/opamp-spec/zipball/$latestTag"
6460

0 commit comments

Comments
 (0)