File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments