dropshell release 2025.0524.1314
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 12s
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 12s
This commit is contained in:
@ -152,8 +152,9 @@ namespace dropshell
|
||||
recursive_copy(tinfo.local_template_path() / "config", service_dir);
|
||||
|
||||
// append TEMPLATE_HASH to the .template_info.env file
|
||||
std::string template_info_env_file = service_dir + "/" + filenames::template_info_env;
|
||||
std::ofstream template_info_env_file_out(template_info_env_file);
|
||||
std::string template_info_env_file = localfile::template_info_env(server_name,service_name);
|
||||
ASSERT(std::filesystem::exists(template_info_env_file), "Template info env file not found: " + template_info_env_file);
|
||||
std::ofstream template_info_env_file_out(template_info_env_file, std::ios::app); // append to the file.
|
||||
template_info_env_file_out << "TEMPLATE_HASH=" << tinfo.hash() << std::endl;
|
||||
template_info_env_file_out.close();
|
||||
|
||||
@ -249,9 +250,20 @@ namespace dropshell
|
||||
ASSERT(tinfo.is_set(), "Failed to load template " + service_info.template_name);
|
||||
|
||||
// copy across .template_info.env file
|
||||
std::string template_service_env_file = "";
|
||||
std::string target_service_env_file = localfile::template_info_env(server_name, service_name);
|
||||
ASSERT(std::filesystem::exists(template_service_env_file), "Template service env file not found: " + template_service_env_file);
|
||||
std::string template_info_env_file = tinfo.local_template_path() / "config" / filenames::template_info_env;
|
||||
std::string target_template_info_env_file = localfile::template_info_env(server_name, service_name);
|
||||
ASSERT(std::filesystem::exists(template_info_env_file), "Template service env file not found: " + template_info_env_file);
|
||||
std::filesystem::remove(target_template_info_env_file);
|
||||
std::filesystem::copy(template_info_env_file, target_template_info_env_file);
|
||||
|
||||
#pragma message("TODO: merge the template info env file")
|
||||
|
||||
// update hash in template info env file
|
||||
// append TEMPLATE_HASH to the .template_info.env file
|
||||
ASSERT(std::filesystem::exists(target_template_info_env_file), "Template info env file not found: " + target_template_info_env_file);
|
||||
std::ofstream template_info_env_file_out(target_template_info_env_file, std::ios::app); // append to the file.
|
||||
template_info_env_file_out << "TEMPLATE_HASH=" << tinfo.hash() << std::endl;
|
||||
template_info_env_file_out.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user