Skip to content

Commit

Permalink
fix(ci): replace older by numeric version in api
Browse files Browse the repository at this point in the history
  • Loading branch information
zoobestik committed Nov 27, 2024
1 parent 462644a commit d2d0355
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .teamcity/builds/apiReferences/BuildApiPages.kt
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ fun scriptGenerateSitemap(pagesRoot: String = DEFAULT_DOKKA_PATH): BuildStep = s
fun scriptNoRobots(pagesRoot: String, block: ScriptBuildStep.() -> Unit = {}) = ScriptBuildStep {
name = "Add no robots for older versions"
workingDir = pagesRoot
//language=bash
//language=sh
scriptContent = """
#!/bin/sh
find . -type f -path "*/api/*/older/*.html" -exec sed -i -E 's/(<head[^>]*>)/\1<meta name="robots" content="noindex, nofollow">/g' {} \;
find . -type f \( -regex "^./\d\+\.\d\+\(\.\d\)\?/.\+\.html${'$'}" \) -exec echo {} \; -exec sed -i -E 's/(<head[^>]*>)/\1<meta name="robots" content="noindex, nofollow">/g' {} \;
""".trimIndent()
dockerImage = "alpine"
}.apply(block)

0 comments on commit d2d0355

Please sign in to comment.