Skip to content

Commit db4cc08

Browse files
committed
Fix the build
1 parent 1ac0bcf commit db4cc08

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.github/renovate.json5

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,15 @@
202202
depNameTemplate: 'java',
203203
extractVersionTemplate: '^(?<version>\\d+)',
204204
},
205+
{
206+
customType: 'regex',
207+
datasourceTemplate: 'github-releases',
208+
managerFilePatterns: [
209+
'**/build.gradle.kts',
210+
],
211+
matchStrings: [
212+
'"https://github.com/(?<depName>[^/]+/[^/]+)/zipball/(?<currentValue>.+?)"',
213+
],
214+
},
205215
],
206216
}

opamp-client/build.gradle.kts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import de.undercouch.gradle.tasks.download.DownloadExtension
2-
import java.net.HttpURLConnection
3-
import java.net.URL
42

53
plugins {
64
id("otel.java-conventions")
@@ -53,19 +51,7 @@ abstract class DownloadOpampProtos @Inject constructor(
5351

5452
@TaskAction
5553
fun execute() {
56-
// Get the latest release tag by following the redirect from GitHub's latest release URL
57-
val latestReleaseUrl = "https://github.com/open-telemetry/opamp-spec/releases/latest"
58-
val connection = URL(latestReleaseUrl).openConnection() as HttpURLConnection
59-
connection.instanceFollowRedirects = false
60-
connection.requestMethod = "HEAD"
61-
62-
val redirectLocation = connection.getHeaderField("Location")
63-
connection.disconnect()
64-
65-
// Extract tag from URL like: https://github.com/open-telemetry/opamp-spec/releases/tag/v0.12.0
66-
val latestTag = redirectLocation.substringAfterLast("/")
67-
// Download the source code for the latest release
68-
val zipUrl = "https://github.com/open-telemetry/opamp-spec/zipball/$latestTag"
54+
val zipUrl = "https://github.com/open-telemetry/opamp-spec/zipball/v0.14.0"
6955

7056
download.run {
7157
src(zipUrl)

0 commit comments

Comments
 (0)