Skip to content

Commit

Permalink
chore(ci); fix api naming
Browse files Browse the repository at this point in the history
  • Loading branch information
zoobestik committed Nov 20, 2024
1 parent 02347cc commit 5382cf3
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import builds.apiReferences.templates.BuildApiReference
import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxCoroutinesBuildApiReference : BuildType({
name = "$KOTLINX_COROUTINES_ID API reference"
name = "$KOTLINX_COROUTINES_ID pages"
description = "Build pages for Kotlinx Coroutines"

templates(BuildApiReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxCoroutinesPrepareDokkaTemplates : BuildType({
name = "$KOTLINX_COROUTINES_ID templates"
description = "Build dokka templates for Kotlinx Coroutines"
description = "Build Dokka Templates for Kotlinx Coroutines"

templates(PrepareDokkaTemplate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import builds.apiReferences.templates.scriptDropSnapshot
import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxDatetimeBuildApiReference : BuildType({
name = "$KOTLINX_DATETIME_ID API reference"
name = "$KOTLINX_DATETIME_ID pages"
description = "Build pages for Kotlinx Datetime"

templates(BuildApiReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.buildSteps.script

object KotlinxIOBuildApiReference : BuildType({
name = "$KOTLINX_IO_ID API reference"
name = "$KOTLINX_IO_ID pages"
description = "Build pages for Kotlinx IO"

templates(BuildApiReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxIOPrepareDokkaTemplates : BuildType({
name = "$KOTLINX_IO_ID templates"
description = "Build dokka templates for Kotlinx IO"
description = "Build Dokka Templates for Kotlinx IO"

templates(PrepareDokkaTemplate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import jetbrains.buildServer.configs.kotlin.buildSteps.script
private const val LIB_DIR = "libraries/kotlinx-metadata/jvm"

object KotlinxMetadataJvmBuildApiReference : BuildType({
name = "$KOTLINX_METADATA_ID API reference"
name = "$KOTLINX_METADATA_ID pages"
description = "Build pages for Kotlinx Metadata JVM"

templates(BuildApiReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxMetadataJvmPrepareDokkaTemplates : BuildType({
name = "$KOTLINX_METADATA_ID templates"
description = "Build dokka templates for Kotlinx Metadata JVM"
description = "Build Dokka Templates for Kotlinx Metadata JVM"

templates(PrepareDokkaTemplate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import builds.apiReferences.templates.BuildApiReference
import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxSerializationBuildApiReference : BuildType({
name = "$KOTLINX_SERIALIZATION_ID API reference"
name = "$KOTLINX_SERIALIZATION_ID pages"
description = "Build pages for Kotlinx Serialization"

templates(BuildApiReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxSerializationPrepareDokkaTemplates : BuildType({
name = "$KOTLINX_SERIALIZATION_ID templates"
description = "Builds API reference for Kotlinx Serialization"
description = "Builds Dokka Templates for Kotlinx Serialization"

templates(PrepareDokkaTemplate)

Expand Down
91 changes: 47 additions & 44 deletions .teamcity/builds/apiReferences/stdlib/BuildStdlibApiReference.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,62 @@ package builds.apiReferences.stdlib

import BuildParams.KOTLIN_CORE_API_BUILD_ID
import builds.scriptDistAnalyze
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.AbsoluteId
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.buildSteps.script

object BuildStdlibApiReference : BuildType({
name = "Core API reference"
name = "Core API pages"
description = "Build pages for Kotlin Core API"

vcs {
root(vcsRoots.KotlinLangOrg, """
scripts/doindex/
""".trimIndent())
root(
vcsRoots.KotlinLangOrg, """
scripts/doindex/
""".trimIndent()
)
}

artifactRules = """
+:dist/api/core/** => pages.zip
+:pages.json => ./
""".trimIndent()
artifactRules = """
+:dist/api/core/** => pages.zip
+:pages.json => ./
""".trimIndent()

steps {
script {
name = "Drop unnecessary files"
// language=bash
scriptContent = """
rm ./dist/api/core/not-found-version.html
# empty pages.json
mv ./dist/api/core/scripts/pages.json ./
echo "[]" > ./dist/api/core/scripts/pages.json
""".trimIndent()
}
script {
name = "Add no robots for older versions"
workingDir = "dist/"
//language=bash
scriptContent = """
#!/bin/sh
find . -type f -path "*/api/*/older/*.html" -exec sed -i -E 's/(<head[^>]*>)/\1<meta name="robots" content="noindex, nofollow">/g' {} \;
""".trimIndent()
dockerImage = "alpine"
}
scriptDistAnalyze {
enabled = false
scriptContent += "\nmv sitemap.xml api/core/sitemap.xml"
}
}
steps {
script {
name = "Drop unnecessary files"
// language=bash
scriptContent = """
rm ./dist/api/core/not-found-version.html
# empty pages.json
mv ./dist/api/core/scripts/pages.json ./
echo "[]" > ./dist/api/core/scripts/pages.json
""".trimIndent()
}
script {
name = "Add no robots for older versions"
workingDir = "dist/"
//language=bash
scriptContent = """
#!/bin/sh
find . -type f -path "*/api/*/older/*.html" -exec sed -i -E 's/(<head[^>]*>)/\1<meta name="robots" content="noindex, nofollow">/g' {} \;
""".trimIndent()
dockerImage = "alpine"
}
scriptDistAnalyze {
enabled = false
scriptContent += "\nmv sitemap.xml api/core/sitemap.xml"
}
}

dependencies {
dependency(AbsoluteId(KOTLIN_CORE_API_BUILD_ID)) {
artifacts {
buildRule = lastSuccessful()
cleanDestination = true
artifactRules = "latest-version.zip!all-libs/** => dist/api/core/"
}
dependencies {
dependency(AbsoluteId(KOTLIN_CORE_API_BUILD_ID)) {
artifacts {
buildRule = lastSuccessful()
cleanDestination = true
artifactRules = "latest-version.zip!all-libs/** => dist/api/core/"
}
}
}
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import jetbrains.buildServer.configs.kotlin.BuildType
*/
object StdlibPrepareDokkaTemplates : BuildType({
name = "Core API templates"
description = "Build pages for Kotlin Core API"
description = "Build Dokka Templates for Kotlin Core API"

templates(PrepareDokkaTemplate)

Expand Down

0 comments on commit 5382cf3

Please sign in to comment.