diff --git a/dadk-config/templates/config/userapp_config.toml b/dadk-config/templates/config/userapp_config.toml index 5556bca..eb085f1 100644 --- a/dadk-config/templates/config/userapp_config.toml +++ b/dadk-config/templates/config/userapp_config.toml @@ -7,12 +7,11 @@ version = "0.2.0" # 用户程序描述信息 description = "" -# (可选)是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果 -build-once = true +# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果 +build-once = false -# (可选) 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装 - -install-once = true +# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装 +install-once = false # 目标架构 # 可选值:"x86_64", "aarch64", "riscv64" diff --git a/dadk-config/tests/test_user_config.rs b/dadk-config/tests/test_user_config.rs index 50c5028..ef7d407 100644 --- a/dadk-config/tests/test_user_config.rs +++ b/dadk-config/tests/test_user_config.rs @@ -31,8 +31,8 @@ fn test_parse_dadk_user_config(ctx: &mut DadkConfigTestContext) { name: "userapp_config".to_string(), version: "0.2.0".to_string(), description: "".to_string(), - build_once: true, - install_once: true, + build_once: false, + install_once: false, task_source: TaskSource { source_type: TaskSourceType::BuildFromSource, source: Source::Git, diff --git a/dadk-user/src/executor/mod.rs b/dadk-user/src/executor/mod.rs index 1e1ca36..6fea200 100644 --- a/dadk-user/src/executor/mod.rs +++ b/dadk-user/src/executor/mod.rs @@ -176,7 +176,7 @@ impl Executor { fn build(&mut self) -> Result<(), ExecutorError> { if let Some(status) = self.task_log().build_status() { if let Some(build_time) = self.task_log().build_time() { - let mut last_modified = last_modified_time(&self.entity.file_path(), build_time)?; + let mut last_modified = last_modified_time(&self.entity.file_path(), build_time)?; last_modified = core::cmp::max( last_modified, last_modified_time(&self.src_work_dir(), build_time)?, @@ -238,7 +238,10 @@ impl Executor { } } } - log::trace!("dadk-user: to do install {}", self.entity.task().name_version()); + log::trace!( + "dadk-user: to do install {}", + self.entity.task().name_version() + ); return self.do_install(); } diff --git a/dadk-user/src/parser/mod.rs b/dadk-user/src/parser/mod.rs index 6997f97..0f7ecc2 100644 --- a/dadk-user/src/parser/mod.rs +++ b/dadk-user/src/parser/mod.rs @@ -221,7 +221,6 @@ impl Parser { // 从toml文件中解析出DADKTask let mut task: DADKTask = Self::parse_toml_file(config_file)?; - // 去除字符串中的空白字符 task.trim();