<commit_before>package OpenSourceProjects_Storybook.buildTypes

import jetbrains.buildServer.configs.kotlin.v2017_2.*
import jetbrains.buildServer.configs.kotlin.v2017_2.buildFeatures.commitStatusPublisher
import jetbrains.buildServer.configs.kotlin.v2017_2.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2017_2.failureConditions.BuildFailureOnMetric
import jetbrains.buildServer.configs.kotlin.v2017_2.failureConditions.failOnMetricChange

enum class StorybookApp(val appName: String, val exampleDir: String, val merged: Boolean = true) {
    CRA("CRA", "cra-kitchen-sink"),
    VUE("Vue", "vue-kitchen-sink"),
    ANGULAR("Angular", "angular-cli"),
    POLYMER("Polymer", "polymer-cli"),
    MITHRIL("Mithril", "mithril-kitchen-sink"),
    HTML("HTML", "html-kitchen-sink", false);

    val lowerName = appName.toLowerCase()

    val artifactPath = "examples/$exampleDir/storybook-static => $lowerName.zip"

    val config = object : BuildType(init@{
        uuid = "8cc5f747-4ca7-4f0d-940d-b0c422f501a6-$lowerName"
        id = "OpenSourceProjects_Storybook_$appName"
        name = appName

        if (!merged) return@init

        artifactRules = artifactPath

        vcs {
            root(OpenSourceProjects_Storybook.vcsRoots.OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster)
        }

        steps {
            script {
                name = "Bootstrap"
                scriptContent = """
                    yarn
                    yarn bootstrap --core
                """.trimIndent()
                dockerImage = "node:latest"
            }
            script {
                name = "build"
                scriptContent = """
                    #!/bin/sh

                    set -e -x

                    cd examples/$exampleDir
                    yarn build-storybook
                """.trimIndent()
                dockerImage = "node:latest"
            }
        }<commit_msg>TeamCity: VCS root setting can't be versioned<commit_after>package OpenSourceProjects_Storybook.buildTypes

import jetbrains.buildServer.configs.kotlin.v2017_2.*
import jetbrains.buildServer.configs.kotlin.v2017_2.buildFeatures.commitStatusPublisher
import jetbrains.buildServer.configs.kotlin.v2017_2.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2017_2.failureConditions.BuildFailureOnMetric
import jetbrains.buildServer.configs.kotlin.v2017_2.failureConditions.failOnMetricChange

enum class StorybookApp(val appName: String, val exampleDir: String, val merged: Boolean = true) {
    CRA("CRA", "cra-kitchen-sink"),
    VUE("Vue", "vue-kitchen-sink"),
    ANGULAR("Angular", "angular-cli"),
    POLYMER("Polymer", "polymer-cli"),
    MITHRIL("Mithril", "mithril-kitchen-sink"),
    HTML("HTML", "html-kitchen-sink", false);

    val lowerName = appName.toLowerCase()

    val artifactPath = "examples/$exampleDir/storybook-static => $lowerName.zip"

    val config = object : BuildType(init@{
        uuid = "8cc5f747-4ca7-4f0d-940d-b0c422f501a6-$lowerName"
        id = "OpenSourceProjects_Storybook_$appName"
        name = appName

        vcs {
            root(OpenSourceProjects_Storybook.vcsRoots.OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster)
        }

        if (!merged) return@init

        artifactRules = artifactPath

        steps {
            script {
                name = "Bootstrap"
                scriptContent = """
                    yarn
                    yarn bootstrap --core
                """.trimIndent()
                dockerImage = "node:latest"
            }
            script {
                name = "build"
                scriptContent = """
                    #!/bin/sh

                    set -e -x

                    cd examples/$exampleDir
                    yarn build-storybook
                """.trimIndent()
                dockerImage = "node:latest"
            }
        }
{'fraction_non_alphanumeric': 0.10096397767630644, 'fraction_numerical': 0.0228310502283105, 'mean_word_length': 2.2506183017312447, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5715197', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1136, 'n_words': 182}