mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 11:08:30 +00:00
feat: Enhance dependency management and project setup
- Added support for registry-based dependencies in the dependencies section. - Updated the package section to include a project type field. - Introduced a new CLI command `dcr setup` to load and display registry configurations. - Implemented a new module for handling registry operations, including loading and resolving packages from registries. - Enhanced the build process to handle library packaging, including copying headers and libraries to the appropriate target directories. - Updated the CLI to support building library packages and added tests for library package builds. - Improved error handling and output messages during dependency resolution and package fetching.
This commit is contained in:
16
src/cli/setup.rs
Normal file
16
src/cli/setup.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
pub fn setup(_args: &[String]) -> i32 {
|
||||
println!("Setting up DCR registries...");
|
||||
match crate::core::registry::RegistryManager::load() {
|
||||
Ok(manager) => {
|
||||
println!("Loaded {} registries.", manager.config.registry.len());
|
||||
for (name, reg) in manager.config.registry {
|
||||
println!("- {}: {} (priority {})", name, reg.url, reg.priority);
|
||||
}
|
||||
0
|
||||
}
|
||||
Err(e) => {
|
||||
println!("Error: {}", e);
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user