Skip to content

Commit

Permalink
Encode semconv version in build dir to fix build cache (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Mar 14, 2024
1 parent 8b1484e commit fb6ec6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"

val downloadSemanticConventions by tasks.registering(Download::class) {
src(semanticConventionsRepoZip)
dest("$buildDir/semantic-conventions/semantic-conventions.zip")
dest("$buildDir/semantic-conventions-${semanticConventionsVersion}/semantic-conventions.zip")
overwrite(false)
}

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

fun generateTask(taskName: String, incubating: Boolean) {
Expand All @@ -88,7 +88,7 @@ fun generateTask(taskName: String, incubating: Boolean) {
setArgs(listOf(
"run",
"--rm",
"-v", "$buildDir/semantic-conventions/model:/source",
"-v", "$buildDir/semantic-conventions-${semanticConventionsVersion}/model:/source",
"-v", "$projectDir/buildscripts/templates:/templates",
"-v", "$projectDir/$outputDir:/output",
"otel/semconvgen:$generatorVersion",
Expand Down

0 comments on commit fb6ec6a

Please sign in to comment.