<commit_before><?php
namespace Deployer;

require 'recipe/common.php';
require 'vendor/deployer/recipes/recipe/phinx.php';
require 'vendor/deployer/recipes/recipe/sentry.php';

// Project name
set('application', 'scat');

// Project repository
set('repository', 'https://github.com/jimwins/scat.git');

// Shared files/dirs between deploys 
set('shared_files', []);
set('shared_dirs', []);

if ($_ENV['SENTRY_TOKEN']) {
  set('sentry', [
    'organization' => $_ENV['SENTRY_ORG'],
    'projects' => [ 'scat-web' ],
    'token' => $_ENV['SENTRY_TOKEN'],
  ]);
}

// Hosts
inventory('hosts.yml');

// Tasks

desc('Deploy your project');
task('deploy', [
    'deploy:info',
    'deploy:prepare',
    'deploy:lock',
    'deploy:release',
    'deploy:update_code',
    'deploy:shared',
    'deploy:writable',
    'deploy:vendors',
    'deploy:clear_paths',
    'deploy:symlink',
    'deploy:unlock',
    'cleanup',
    'success'
]);

after('cleanup', 'phinx:migrate');

if ($_ENV['SENTRY_TOKEN']) {
  after('deploy', 'sentry');
}

// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');<commit_msg>Upgrade for Deployer 7<commit_after><?php
namespace Deployer;

require 'recipe/composer.php';

require 'contrib/phinx.php';
require 'contrib/sentry.php';

// Project name
set('application', 'scat');

// Project repository
set('repository', 'https://github.com/jimwins/scat.git');

// Shared files/dirs between deploys 
set('shared_files', []);
set('shared_dirs', []);

if ($_ENV['SENTRY_TOKEN']) {
  set('sentry', [
    'organization' => $_ENV['SENTRY_ORG'],
    'projects' => [ 'scat-web' ],
    'token' => $_ENV['SENTRY_TOKEN'],
  ]);
}

// Hosts
import('hosts.yml');

// Tasks

after('deploy:cleanup', 'phinx:migrate');

if ($_ENV['SENTRY_TOKEN']) {
  after('deploy:success', 'deploy:sentry');
}

// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
{'fraction_non_alphanumeric': 0.20863683662851196, 'fraction_numerical': 0.0005202913631633715, 'mean_word_length': 4.809667673716012, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '2695099', 'n_tokens_mistral': 711, 'n_tokens_neox': 699, 'n_words': 117}