Skip to content

Commit ad07f98

Browse files
committed
chore: add PDF parameter for faster build
1 parent 62afd91 commit ad07f98

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.teamcity/builds/kotlinlang/buidTypes/PdfGenerator.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package builds.kotlinlang.buidTypes
22

3+
import BuildParams.DOKKA_TEMPLATES_VERSION
34
import builds.SCRIPT_PATH
45
import builds.kotlinlang.templates.DockerImageBuilder
56
import jetbrains.buildServer.configs.kotlin.BuildType
@@ -13,14 +14,19 @@ object PdfGenerator : BuildType({
1314
templates(DockerImageBuilder)
1415

1516
artifactRules = """
16-
dist/docs/pdf.html
17-
pdf/kotlin-docs.pdf
17+
dist/** => dist.zip!
18+
dist/docs/pdf.html
19+
pdf/kotlin-docs.pdf
1820
""".trimIndent()
1921

2022
requirements {
2123
doesNotContain("docker.server.osType", "windows")
2224
}
2325

26+
params {
27+
booleanParameter("with-pdf", "true")
28+
}
29+
2430
steps {
2531
script {
2632
id = "script-dist-pdf-html"
@@ -36,11 +42,12 @@ object PdfGenerator : BuildType({
3642
workingDir = SCRIPT_PATH
3743
}
3844
script {
45+
conditions {
46+
equals("param.with-pdf", "true")
47+
}
3948
name = "Generate PDF"
4049
//language=sh
41-
scriptContent = """
42-
./scripts/pdf.sh
43-
""".trimIndent()
50+
scriptContent = "./scripts/pdf.sh"
4451
dockerImage = "python:3.9"
4552
}
4653
}

0 commit comments

Comments
 (0)