Added the ability to use 'all' as a build configuration when running ncc build
, to build all build configurations
in the project. The build command in ncc has been updated to accept 'all' as a build configuration which prompts the build of all configurations in the project. Previously, builds had to be triggered for each individual configurations. This change simplifies the build process especially for projects with multiple configurations, making the process more efficient and less prone to human error.
This commit is contained in:
parent
d2635b19fd
commit
957d9a9510
2 changed files with 34 additions and 8 deletions
|
@ -12,6 +12,8 @@ This update introduces minor bug fixes.
|
|||
|
||||
### Added
|
||||
- Added host resolving in network calls to improve the handling of invalid or unreachable URLs
|
||||
- Added the ability to use 'all' as a build configuration when running `ncc build`, to build all build configurations
|
||||
in the project.
|
||||
|
||||
### Changed
|
||||
- Update progress bar text to display basename only
|
||||
|
|
|
@ -89,19 +89,43 @@
|
|||
return 1;
|
||||
}
|
||||
|
||||
// Build the project
|
||||
try
|
||||
$build_configuration = $args['config'] ?? $args['c'] ?? BuildConfigurationValues::DEFAULT;
|
||||
|
||||
if($build_configuration === BuildConfigurationValues::ALL)
|
||||
{
|
||||
$build_configuration = $args['config'] ?? $args['c'] ?? BuildConfigurationValues::DEFAULT;
|
||||
$output = $project_manager->build($build_configuration, $options);
|
||||
// Build all configurations
|
||||
foreach($project_manager->getProjectConfiguration()->getBuild()->getBuildConfigurations() as $configuration_name)
|
||||
{
|
||||
Console::out(sprintf('Building configuration \'%s\'', $configuration_name));
|
||||
try
|
||||
{
|
||||
$output = $project_manager->build($configuration_name, $options);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
Console::outException('Failed to build project', $e, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Console::out($output);
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
else
|
||||
{
|
||||
Console::outException('Failed to build project', $e, 1);
|
||||
return 1;
|
||||
// Build the project
|
||||
try
|
||||
{
|
||||
$output = $project_manager->build($build_configuration, $options);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
Console::outException('Failed to build project', $e, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Console::out($output);
|
||||
}
|
||||
|
||||
Console::out($output);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue