mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
chore: Added --no-dev
composer flag for some workflows
This commit is contained in:
parent
4f9cc9fe0f
commit
710d37b75b
3 changed files with 18 additions and 17 deletions
2
.github/workflows/cd.yml
vendored
2
.github/workflows/cd.yml
vendored
|
@ -47,7 +47,7 @@ jobs:
|
|||
run: composer update --no-install
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
run: composer install --no-dev --no-progress --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: Cleanup
|
||||
run: php _cleanup.php && rm _cleanup.php
|
||||
|
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
run: composer update --no-install
|
||||
|
||||
- name: Install Composer dependencies 🪚
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
run: composer install --no-dev --no-progress --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: Get commit hash 🔗
|
||||
id: get-commit-hash
|
||||
|
@ -63,7 +63,7 @@ jobs:
|
|||
run: composer update --no-install
|
||||
|
||||
- name: 🖇 Install Composer dependencies
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
run: composer install --no-dev --no-progress --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: 📂 Sync files
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
||||
|
|
29
install.php
29
install.php
|
@ -117,20 +117,6 @@ chmod_r(BB_ROOT . 'internal_data', 0755, 0644);
|
|||
chmod_r(BB_ROOT . 'sitemap', 0755, 0644);
|
||||
out("- Permissions successfully applied!\n", 'success');
|
||||
|
||||
// Ask if user is a developer before installing dependencies
|
||||
$isDeveloper = false;
|
||||
echo "\nAre you a developer who needs testing tools and dev dependencies? [y/N]: ";
|
||||
if (str_starts_with(mb_strtolower(trim(readline())), 'y')) {
|
||||
$isDeveloper = true;
|
||||
if (!version_compare(PHP_VERSION, '8.2.0', '>=')) {
|
||||
out("- Warning: Development dependencies require PHP 8.2+, your version is " . PHP_VERSION, 'warning');
|
||||
out("- Some testing tools may not work properly", 'warning');
|
||||
}
|
||||
out("- Installing all dependencies including dev tools...", 'info');
|
||||
} else {
|
||||
out("- Installing production dependencies only...\n", 'info');
|
||||
}
|
||||
|
||||
// Check composer installation
|
||||
if (!is_file(BB_ROOT . 'vendor/autoload.php')) {
|
||||
out('- Hmm, it seems there are no Composer dependencies', 'info');
|
||||
|
@ -159,6 +145,21 @@ if (!is_file(BB_ROOT . 'vendor/autoload.php')) {
|
|||
// Installing dependencies
|
||||
if (is_file(BB_ROOT . 'composer.phar')) {
|
||||
out('- Installing dependencies...', 'info');
|
||||
|
||||
// Ask if user is a developer before installing dependencies
|
||||
$isDeveloper = false;
|
||||
echo "\nAre you a developer who needs testing tools and dev dependencies? [y/N]: ";
|
||||
if (str_starts_with(mb_strtolower(trim(readline())), 'y')) {
|
||||
$isDeveloper = true;
|
||||
if (!version_compare(PHP_VERSION, '8.2.0', '>=')) {
|
||||
out("- Warning: Development dependencies require PHP 8.2+, your version is " . PHP_VERSION, 'warning');
|
||||
out("- Some testing tools may not work properly", 'warning');
|
||||
}
|
||||
out("- Installing all dependencies including dev tools...\n", 'info');
|
||||
} else {
|
||||
out("- Installing production dependencies only...\n", 'info');
|
||||
}
|
||||
|
||||
runProcess('php ' . BB_ROOT . 'composer.phar update --no-install');
|
||||
sleep(3);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue