chore: Added --no-dev composer flag for some workflows

This commit is contained in:
Roman Kelesidis 2025-06-20 22:26:58 +03:00
commit 710d37b75b
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4
3 changed files with 18 additions and 17 deletions

View file

@ -47,7 +47,7 @@ jobs:
run: composer update --no-install run: composer update --no-install
- name: Install Composer dependencies - 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 - name: Cleanup
run: php _cleanup.php && rm _cleanup.php run: php _cleanup.php && rm _cleanup.php

View file

@ -23,7 +23,7 @@ jobs:
run: composer update --no-install run: composer update --no-install
- name: Install Composer dependencies 🪚 - 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 🔗 - name: Get commit hash 🔗
id: get-commit-hash id: get-commit-hash
@ -63,7 +63,7 @@ jobs:
run: composer update --no-install run: composer update --no-install
- name: 🖇 Install Composer dependencies - 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 - name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.5 uses: SamKirkland/FTP-Deploy-Action@v4.3.5

View file

@ -117,20 +117,6 @@ chmod_r(BB_ROOT . 'internal_data', 0755, 0644);
chmod_r(BB_ROOT . 'sitemap', 0755, 0644); chmod_r(BB_ROOT . 'sitemap', 0755, 0644);
out("- Permissions successfully applied!\n", 'success'); 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 // Check composer installation
if (!is_file(BB_ROOT . 'vendor/autoload.php')) { if (!is_file(BB_ROOT . 'vendor/autoload.php')) {
out('- Hmm, it seems there are no Composer dependencies', 'info'); out('- Hmm, it seems there are no Composer dependencies', 'info');
@ -159,6 +145,21 @@ if (!is_file(BB_ROOT . 'vendor/autoload.php')) {
// Installing dependencies // Installing dependencies
if (is_file(BB_ROOT . 'composer.phar')) { if (is_file(BB_ROOT . 'composer.phar')) {
out('- Installing dependencies...', 'info'); 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'); runProcess('php ' . BB_ROOT . 'composer.phar update --no-install');
sleep(3); sleep(3);