<commit_before><?php

namespace Deployer;
require 'vendor/deployer/deployer/recipe/symfony-flex.php';

// Configuration
set('repository', '<EMAIL>:famoser/nodika.git');
set('shared_files', array_merge(get('shared_files'), ["var/data.db3"]));

// import servers
inventory('servers.yml');

//stages: dev, testing, production
set('default_stage', 'dev');

//use php 7.1
set(
    'bin/php',
    '/usr/local/php71/bin/php'
);

//build yarn stuff & upload
task('frontend:build', function () {
    runLocally('yarn install');
    runLocally('yarn run build');
    runLocally('rsync -azP public/dist {{user}}@{{hostname}}:{{release_path}}/public');
})->desc('Build frontend assets');

//load fixtures for dev
task('database:fixtures', function () {
    if (get('stage') == "dev") {
        //ensure dev
        $before = get("symfony_env");
        set('symfony_env', 'dev');
        run('{{bin/php}} {{bin/console}} doctrine:fixtures:load {{console_options}}');
        set('symfony_env', $before);
    }
})->desc('Initializing example data if on dev stage');

// kill php processes to ensure symlinks are refreshed
task('deploy:refresh_symlink', function () {
    run("killall -9 php-cgi"); //kill all php processes so symlink is refreshed
})->desc('Refreshing symlink');
//frontend stuff
after('deploy:vendor', 'frontend:build');
// migrations
after('deploy:writable', 'database:migrate');
// fixtures
after('database:migrate', 'database:fixtures');
// refresh symlink
after('deploy:symlink', 'deploy:refresh_symlink');<commit_msg>deployment bugfix<commit_after><?php

namespace Deployer;
require 'vendor/deployer/deployer/recipe/symfony-flex.php';

// Configuration
set('repository', '<EMAIL>:famoser/nodika.git');
set('shared_files', array_merge(get('shared_files'), ["var/data.db3"]));

// import servers
inventory('servers.yml');

//stages: dev, testing, production
set('default_stage', 'dev');

//use php 7.1
set(
    'bin/php',
    '/usr/local/php71/bin/php'
);

//build yarn stuff & upload
task('frontend:build', function () {
    runLocally('yarn install');
    runLocally('yarn run build');
    runLocally('rsync -azP public/dist {{user}}@{{hostname}}:{{release_path}}/public');
})->desc('Build frontend assets');

//load fixtures for dev
task('database:fixtures', function () {
    if (get('stage') == "dev") {
        //ensure dev
        $before = get("symfony_env");
        set('symfony_env', 'dev');
        run('{{bin/php}} {{bin/console}} doctrine:fixtures:load {{console_options}}');
        set('symfony_env', $before);
    }
})->desc('Initializing example data if on dev stage');

// kill php processes to ensure symlinks are refreshed
task('deploy:refresh_symlink', function () {
    run("killall -9 php-cgi"); //kill all php processes so symlink is refreshed
})->desc('Refreshing symlink');
//frontend stuff
after('deploy:vendors', 'frontend:build');
// migrations
after('deploy:writable', 'database:migrate');
// fixtures
after('database:migrate', 'database:fixtures');
// refresh symlink
after('deploy:symlink', 'deploy:refresh_symlink');
{'fraction_non_alphanumeric': 0.1903827281648675, 'fraction_numerical': 0.003925417075564278, 'mean_word_length': 4.85823754789272, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '2294247', 'n_tokens_mistral': 1004, 'n_tokens_neox': 985, 'n_words': 218}