<commit_before><?php

namespace OpenDominion\Console\Commands;

use Cache;
use Illuminate\Console\Command;
use Symfony\Component\Console\Output\OutputInterface;

class VersionUpdateCommand extends Command implements CommandInterface
{
    protected const REPO_URL = 'https://github.com/WaveHack/OpenDominion';

    /** @var string The name and signature of the console command */
    protected $signature = 'version:update';

    /** @var string The console command description */
    protected $description = 'Updates game version';

    /**
     * {@inheritdoc}
     */
    public function handle(): void
    {
        $this->info('Updating version', OutputInterface::VERBOSITY_DEBUG);

        $tag = trim(shell_exec('git describe --tags'));

        $version = null;
        $versionDate = trim(shell_exec('git log --pretty="%ci" -n1 HEAD'));
        $versionHtml = null;

        if ($tag !== '') {
            preg_match('/(\d+\.\d+\.\d+(?:-\d+)?)(?:-(\d+)(?:\-g([0-9a-f]{8})))?/', $tag, $matches);

            $releaseVersion = $matches[1];

            $version = $tag;

            $versionHtml = '<strong>';
            $versionHtml .= sprintf(
                '<a href="%1$s/releases/tag/%2$s" target="_blank">%2$s</a>',
                static::REPO_URL,
                $releaseVersion
            );

            if (isset($matches[2])) {
                $commitsUponRelease = $matches[2];
                $hash = $matches[3];

                $versionHtml .= sprintf(
                    '-%s-g<a href="%s/compare/%s...%s" target="_blank">%s</a>',
                    $commitsUponRelease,
                    static::REPO_URL,
                    $releaseVersion,
                    $hash,
                    $hash
                );
            }

            $versionHtml .= '</strong>';
        }

        Cache::forever('version', $version);
        Cache::forever('version-date', $versionDate);
        Cache::forever('version-html', $versionHtml);

        $this->info("Version updated to: {$version}");
    }
}
<commit_msg>Make second part in version html non-bold<commit_after><?php

namespace OpenDominion\Console\Commands;

use Cache;
use Illuminate\Console\Command;
use Symfony\Component\Console\Output\OutputInterface;

class VersionUpdateCommand extends Command implements CommandInterface
{
    protected const REPO_URL = 'https://github.com/WaveHack/OpenDominion';

    /** @var string The name and signature of the console command */
    protected $signature = 'version:update';

    /** @var string The console command description */
    protected $description = 'Updates game version';

    /**
     * {@inheritdoc}
     */
    public function handle(): void
    {
        $this->info('Updating version', OutputInterface::VERBOSITY_DEBUG);

        $tag = trim(shell_exec('git describe --tags'));

        $version = null;
        $versionDate = trim(shell_exec('git log --pretty="%ci" -n1 HEAD'));
        $versionHtml = null;

        if ($tag !== '') {
            preg_match('/(\d+\.\d+\.\d+(?:-\d+)?)(?:-(\d+)(?:\-g([0-9a-f]{8})))?/', $tag, $matches);

            $releaseVersion = $matches[1];

            $version = $tag;

            $versionHtml = sprintf(
                '<a href="%1$s/releases/tag/%2$s" target="_blank"><strong>%2$s</strong></a>',
                static::REPO_URL,
                $releaseVersion
            );

            if (isset($matches[2])) {
                $commitsUponRelease = $matches[2];
                $hash = $matches[3];

                $versionHtml .= sprintf(
                    '-%s-g<a href="%s/compare/%s...%s" target="_blank">%s</a>',
                    $commitsUponRelease,
                    static::REPO_URL,
                    $releaseVersion,
                    $hash,
                    $hash
                );
            }
        }

        Cache::forever('version', $version);
        Cache::forever('version-date', $versionDate);
        Cache::forever('version-html', $versionHtml);

        $this->info("Version updated to: {$version}");
    }
}

{'fraction_non_alphanumeric': 0.16391422233177225, 'fraction_numerical': 0.005422726152329307, 'mean_word_length': 1.964207450693937, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '3739667', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1136, 'n_words': 224}