Added projects. Part 8

master
alexey 1 month ago
parent ffe340bcae
commit f88ef52d87

@ -552,6 +552,9 @@ end
get "/gitbld/:id/:git_id" do
end
get "/prjcfg/:id" do
end
not_found do
status 404
@page_name = "Кто-то потерялся"

@ -84,7 +84,20 @@ class ProjectsActions
end
if File.exist?(configuration)
conf_path = File.join(fname, PROJECTS_STRUCTURE[:CONFIGS], "#{project_name}.cfg")
FileUtils.cp(configuration, conf_path)
proj_config = <<~PRJ_CFG
include("#{configuration}")
config_opts['plugin_conf']['ccache_enable'] = True
config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '4G'
config_opts['plugin_conf']['ccache_opts']['hashdir'] = True
config_opts['plugin_conf']['ccache_opts']['debug'] = False
config_opts['plugin_conf']['ccache_opts']['show_stats'] = True
config_opts['plugin_conf']['package_state_enable'] = True
config_opts['plugin_conf']['procenv_enable'] = True
config_opts['plugin_conf']['root_cache_enable'] = True
config_opts['plugin_conf']['showrc_enable'] = True
config_opts['plugin_conf']['yum_cache_enable'] = True
PRJ_CFG
File.open(conf_path, "w") { |f| f << proj_config }
@error = @db.proj_create(project_name, description)
if @error.nil?
created = true

Loading…
Cancel
Save