<commit_before><?php

/**
 * Project Enviroment Setting
 */
$env = getenv('ENVOY_ENV');
$path = getenv('ENVOY_PATH');
$subset = getenv('ENVOY_SUBSET');

// Support for json on base64 encode or a file
$connections = getenv('ENVOY_CONNECTIONS');
if (is_file($connections)) {
    $connections = file_get_contents($connections);
} else {
    $connections = base64_decode($connections);
}

/**
 * server settings
 * @var JSON
 * @example row set: {"server":{"conn":"foo@bar","option":"-o StrictHostKeyChecking=no"},}
 * @example row set: {"server":"root@foo.bar"},
 */
$server_connections = json_decode($connections, true);

/**
 * number of releases keep on remote
 */
$release_keep_count = 2;

/**
 * Release package name
 */<commit_msg>Add to support connections with base64.<commit_after><?php

/**
 * Project Enviroment Setting
 */
$env = getenv('ENVOY_ENV');
$path = getenv('ENVOY_PATH');
$subset = getenv('ENVOY_SUBSET');

// Support for json on base64 encode or a file
$connections = getenv('ENVOY_CONNECTIONS');
if (is_file($connections)) {
    $connections = file_get_contents($connections);
}
else if (preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $connections)) {
    $connections = base64_decode($connections);
}

/**
 * server settings
 * @var JSON
 * @example row set: {"server":{"conn":"foo@bar","option":"-o StrictHostKeyChecking=no"},}
 * @example row set: {"server":"root@foo.bar"},
 */
$server_connections = json_decode($connections, true);

/**
 * number of releases keep on remote
 */
$release_keep_count = 2;

/**
 * Release package name
 */
{'fraction_non_alphanumeric': 0.18363402061855671, 'fraction_numerical': 0.010309278350515464, 'mean_word_length': 5.212, 'pattern_counts': {'":': 8, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7010108', 'n_tokens_mistral': 540, 'n_tokens_neox': 514, 'n_words': 118}