<commit_before><?php
/**
 * @package server-infra
 * @subpackage propel
 */
function searchFolder($pluginsFolder, $level = 1)
{
	foreach(scandir($pluginsFolder) as $pluginDir)
	{
		if ($pluginDir[0] == ".")
		{
			continue;
		}
		$path = "$pluginsFolder/$pluginDir";
		if (!is_dir($path))
		{
			continue;
		}
		
		if ($level < 2)
		{
			searchFolder($path, $level + 1);
		}
		
		$pluginConfig = "$path/config";
		$buildProps = "$pluginConfig/build.properties";
		if (!file_exists($buildProps))
		{
			continue;
		}

		if(!is_dir($pluginConfig))
			throw new Exception("Illegal input was supplied.");
		
		chdir($pluginConfig);	
		print $pluginConfig;
		passthru("propel-gen $pluginConfig");
	}
}

$origWD = getcwd();

$rootFolder = realpath(dirname(__FILE__)."/../..");

// Core
$alphaConfigFolder = "$rootFolder/alpha/config";
if(!is_dir($alphaConfigFolder))
	throw new Exception("Illegal input was supplied.");

chdir($alphaConfigFolder);
passthru("propel-gen $alphaConfigFolder");

// Plugin
$pluginsFolder = "$rootFolder/plugins"; 
searchFolder($pluginsFolder);
<commit_msg>Fixed the relative location of propel-gen.php's root folder PLAT-496<commit_after><?php
/**
 * @package server-infra
 * @subpackage propel
 */
function searchFolder($pluginsFolder, $level = 1)
{
	foreach(scandir($pluginsFolder) as $pluginDir)
	{
		if ($pluginDir[0] == ".")
		{
			continue;
		}
		$path = "$pluginsFolder/$pluginDir";
		if (!is_dir($path))
		{
			continue;
		}
		
		if ($level < 2)
		{
			searchFolder($path, $level + 1);
		}
		
		$pluginConfig = "$path/config";
		$buildProps = "$pluginConfig/build.properties";
		if (!file_exists($buildProps))
		{
			continue;
		}

		if(!is_dir($pluginConfig))
			throw new Exception("Illegal input was supplied.");
		
		chdir($pluginConfig);	
		print $pluginConfig;
		passthru("propel-gen $pluginConfig");
	}
}

$origWD = getcwd();

$rootFolder = realpath(dirname(__FILE__)."/../../../../..");

// Core
$alphaConfigFolder = "$rootFolder/alpha/config";
if(!is_dir($alphaConfigFolder))
	throw new Exception("Illegal input was supplied.");

chdir($alphaConfigFolder);
passthru("propel-gen $alphaConfigFolder");

// Plugin
$pluginsFolder = "$rootFolder/plugins"; 
searchFolder($pluginsFolder);

{'fraction_non_alphanumeric': 0.17686768676867687, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 4.305489260143198, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6636572', 'n_tokens_mistral': 838, 'n_tokens_neox': 746, 'n_words': 140}