<commit_before><?php

// directory paths
$baseDirectory = realpath(__DIR__.'/..');
$buildDirectory = $baseDirectory . '/build';
$artifactsDirectory = $buildDirectory . '/artifacts';
$stagingDirectory = $artifactsDirectory . '/staging';

// create all needed directories.
if( !file_exists( $artifactsDirectory )) {
    mkdir($artifactsDirectory);
}

// setup packager
require $baseDirectory . '/vendor/mtdowling/burgomaster/src/Burgomaster.php';
$packager = new \Burgomaster( $stagingDirectory, $baseDirectory );

// include readme and license files
foreach(['README.md', 'LICENSE'] as $file) {
    $packager->deepCopy( $file, $file );
}

// include source
$packager->recursiveCopy( 'src', 'GW2Treasures/GW2Api', ['php'] );

// create the autoloader
$packager->createAutoloader();

// build phar and zip archives<commit_msg>Add missing cacert.pem to phar archives<commit_after><?php

// directory paths
$baseDirectory = realpath(__DIR__.'/..');
$buildDirectory = $baseDirectory . '/build';
$artifactsDirectory = $buildDirectory . '/artifacts';
$stagingDirectory = $artifactsDirectory . '/staging';

// create all needed directories.
if( !file_exists( $artifactsDirectory )) {
    mkdir($artifactsDirectory);
}

// setup packager
require $baseDirectory . '/vendor/mtdowling/burgomaster/src/Burgomaster.php';
$packager = new \Burgomaster( $stagingDirectory, $baseDirectory );

// include readme and license files
foreach(['README.md', 'LICENSE'] as $file) {
    $packager->deepCopy( $file, $file );
}

// include source
$packager->recursiveCopy( 'src', 'GW2Treasures/GW2Api', ['php'] );

// include cacert.pem
$packager->deepCopy('src/cacert.pem', 'GW2Treasures/GW2Api/cacert.pem');

// create the autoloader
$packager->createAutoloader();

// build phar and zip archives
{'fraction_non_alphanumeric': 0.16063348416289594, 'fraction_numerical': 0.003393665158371041, 'mean_word_length': 5.058219178082192, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '7171111', 'n_tokens_mistral': 588, 'n_tokens_neox': 571, 'n_words': 126}