Skip to content

Commit fb6ec6a

Browse files
authored
Encode semconv version in build dir to fix build cache (#51)
1 parent 8b1484e commit fb6ec6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"
5656

5757
val downloadSemanticConventions by tasks.registering(Download::class) {
5858
src(semanticConventionsRepoZip)
59-
dest("$buildDir/semantic-conventions/semantic-conventions.zip")
59+
dest("$buildDir/semantic-conventions-${semanticConventionsVersion}/semantic-conventions.zip")
6060
overwrite(false)
6161
}
6262

@@ -69,7 +69,7 @@ val unzipConfigurationSchema by tasks.registering(Copy::class) {
6969
val pathParts = path.split("/")
7070
path = pathParts.subList(1, pathParts.size).joinToString("/")
7171
})
72-
into("$buildDir/semantic-conventions/")
72+
into("$buildDir/semantic-conventions-${semanticConventionsVersion}/")
7373
}
7474

7575
fun generateTask(taskName: String, incubating: Boolean) {
@@ -88,7 +88,7 @@ fun generateTask(taskName: String, incubating: Boolean) {
8888
setArgs(listOf(
8989
"run",
9090
"--rm",
91-
"-v", "$buildDir/semantic-conventions/model:/source",
91+
"-v", "$buildDir/semantic-conventions-${semanticConventionsVersion}/model:/source",
9292
"-v", "$projectDir/buildscripts/templates:/templates",
9393
"-v", "$projectDir/$outputDir:/output",
9494
"otel/semconvgen:$generatorVersion",

0 commit comments

Comments
 (0)