<commit_before>Param(
    [Parameter(Mandatory=$true)]
    [string] $Repo,

    [Parameter()]
    [string] $OnlyComponent = $null,

    [Parameter()]
    [string] $Version = '1.0.0-dev',

    [Parameter()]
    [switch] $Deploy
)

If ($OnlyComponent) {
    $Components = @(
        $OnlyComponent
    )
} Else {
    $Components = @(
        'api',
        'database-proxy',
        'provisioning',
        'ui'
    )
}

$docker = Get-Command docker

Write-Host 'Building images...'
ForEach ($Component in $Components) {
    & $docker build -t "${Repo}/${Component}:${Version}" -f Dockerfile.${Component} .
}
<commit_msg>Improve build-and-deploy script.<commit_after>Param(
    [Parameter(Mandatory=$true)]
    [string] $Repo,

    [Parameter()]
    [string[]] $OnlyComponents = $null,

    [Parameter()]
    [string] $Version = '1.0.0-dev',

    [Parameter()]
    [switch] $Deploy
)

$Components = $OnlyComponents
If (!$Components) {
    $Components = @(
        'api',
        'database-proxy',
        'provisioning',
        'ui'
    )
}

$docker = Get-Command docker

Write-Host 'Building images...'
ForEach ($Component in $Components) {
    & $docker build -t "${Repo}/${Component}:${Version}" -f Dockerfile.${Component} .
}

{'fraction_non_alphanumeric': 0.18470301057770544, 'fraction_numerical': 0.004882017900732303, 'mean_word_length': 2.761467889908257, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3987547', 'n_tokens_mistral': 421, 'n_tokens_neox': 414, 'n_words': 83}