mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-06 21:11:40 -07:00
* misc(cliff): Added automated script for releases creation * Updated * Update functions_cli.php * Updated * Updated * Update functions_cli.php * Updated * Update _release.php * Update cliff.toml * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php * Update _release.php
53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?php
|
||
/**
|
||
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||
*
|
||
* @copyright Copyright (c) 2005-2025 TorrentPier (https://torrentpier.com)
|
||
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||
*/
|
||
|
||
if (!defined('BB_ROOT')) {
|
||
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
||
define('BB_PATH', BB_ROOT);
|
||
}
|
||
|
||
// Check CLI mode
|
||
if (php_sapi_name() !== 'cli') {
|
||
exit;
|
||
}
|
||
|
||
if (!function_exists('removeFile')) {
|
||
// Get all constants
|
||
require_once BB_ROOT . 'library/defines.php';
|
||
|
||
// Include CLI functions
|
||
require INC_DIR . '/functions_cli.php';
|
||
}
|
||
|
||
$items = [
|
||
'.github',
|
||
'.cliffignore',
|
||
'.editorconfig',
|
||
'.gitignore',
|
||
'.styleci.yml',
|
||
'_release.php',
|
||
'CHANGELOG.md',
|
||
'cliff.toml',
|
||
'CODE_OF_CONDUCT.md',
|
||
'CONTRIBUTING.md',
|
||
'crowdin.yml',
|
||
'HISTORY.md',
|
||
'README.md',
|
||
'SECURITY.md'
|
||
];
|
||
|
||
foreach ($items as $item) {
|
||
$path = BB_ROOT . $item;
|
||
|
||
if (is_file($path)) {
|
||
removeFile($path);
|
||
} elseif (is_dir($path)) {
|
||
removeDir($path);
|
||
}
|
||
}
|