Skip to content

Commit

Permalink
πŸ› fix potential issues on the build
Browse files Browse the repository at this point in the history
  • Loading branch information
gfazioli committed Jul 10, 2024
1 parent b3bf041 commit 68dba2e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/Console/bin/bones
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ namespace Bones\SemVer\Exceptions {

use Exception;

class InvalidVersionException extends Exception
{
}
class InvalidVersionException extends Exception {}
}

namespace Bones\SemVer\Traits {
Expand Down Expand Up @@ -468,7 +466,7 @@ namespace Bones {
/**
* MARK: The WP Bones command line version.
*/
define('WPBONES_COMMAND_LINE_VERSION', '1.4.10');
define('WPBONES_COMMAND_LINE_VERSION', '1.4.11');

use Bones\SemVer\Version;
use Exception;
Expand Down Expand Up @@ -1494,20 +1492,20 @@ namespace Bones {

$this->info("βœ… Found '$packageManager' as package manager");

$answer = $this->ask("Do you want to run '$packageManager build' to build assets? (y/n)", 'y');
$answer = $this->ask("Do you want to run '$packageManager run build' to build assets? (y/n)", 'y');

if (strtolower($answer) === 'y') {
$this->info("πŸ“¦ Build for production by using '{$packageManager} build'");
shell_exec("{$packageManager} build");
$this->info("πŸ“¦ Build for production by using '{$packageManager} run build'");
shell_exec("{$packageManager} run build");
$this->info("βœ… Build assets successfully");
do_action('wpbones_console_deploy_after_build_assets', $this, $path);
} else {
$answer = $this->ask("Enter the package manager to build assets (press RETURN to skip the build)", '');
if (empty($answer)) {
$this->info('⏭︎ Skip build assets');
} else {
$this->info("πŸ“¦ Build for production by using '{$answer} build'");
shell_exec("{$answer} build");
$this->info("πŸ“¦ Build for production by using '{$answer} run build'");
shell_exec("{$answer} run build");
$this->info("βœ… Build assets successfully");
}
}
Expand Down

0 comments on commit 68dba2e

Please sign in to comment.