<commit_before>import os
import subprocess
import sys
import time
import shutil
import zipfile

UE_VERSIONS = ['4.15', '4.16', '4.17', '4.18', '4.19', '4.20', '4.21']
PYTHON_VERSIONS = ["C:/Program Files/Python37", "C:/Program Files/Python36", "C:/Python27"]
MSBUILD = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe'
UE_PATH = 'C:/Program Files/Epic Games'
PROJECTS_PATH = 'C:/Users/rober/Documents/Unreal Projects'

RELEASE_DIR = sys.argv[1].rstrip('/')

def zipdir(path, zh, base):
    for root, dirs, files in os.walk(path):
        for file in files:
            filename = os.path.join(root, file)
            zh.write(filename, os.path.relpath(filename, base))

def msbuild(project, python_version):
    base_environ = os.environ
    base_environ.update({'PYTHONHOME': python_version})
    base_environ.update({'UEP_ENABLE_UNITY_BUILD': '1'})
    vs = '"{}"'.format(MSBUILD)
    process = subprocess.Popen('{0} "{1}" /m /t:Rebuild /p:Configuration="Development Editor" /p:Platform=Win64'.format(vs, project), env=base_environ)
    while process.poll() is None:
        time.sleep(0.5)
    if process.returncode != 0:
        sys.exit(process.returncode)
<commit_msg>added 4.22 to automatic build system<commit_after>import os
import subprocess
import sys
import time
import shutil
import zipfile

UE_VERSIONS = ['4.17', '4.18', '4.19', '4.20', '4.21', '4.22']
PYTHON_VERSIONS = ["C:/Program Files/Python37", "C:/Program Files/Python36", "C:/Python27"]
MSBUILD = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe'
UE_PATH = 'C:/Program Files/Epic Games'
PROJECTS_PATH = 'C:/Users/rober/Documents/Unreal Projects'

RELEASE_DIR = sys.argv[1].rstrip('/')

def zipdir(path, zh, base):
    for root, dirs, files in os.walk(path):
        for file in files:
            filename = os.path.join(root, file)
            zh.write(filename, os.path.relpath(filename, base))

def msbuild(project, python_version):
    base_environ = os.environ
    base_environ.update({'PYTHONHOME': python_version})
    base_environ.update({'UEP_ENABLE_UNITY_BUILD': '1'})
    vs = '"{}"'.format(MSBUILD)
    process = subprocess.Popen('{0} "{1}" /m /t:Rebuild /p:Configuration="Development Editor" /p:Platform=Win64'.format(vs, project), env=base_environ)
    while process.poll() is None:
        time.sleep(0.5)
    if process.returncode != 0:
        sys.exit(process.returncode)

{'fraction_non_alphanumeric': 0.16047366271947733, 'fraction_numerical': 0.03674969375255206, 'mean_word_length': 4.072463768115942, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4517047', 'n_tokens_mistral': 928, 'n_tokens_neox': 864, 'n_words': 186}