Added projects. Part 8
This commit is contained in:
3
app.rb
3
app.rb
@@ -552,6 +552,9 @@ end
|
|||||||
get "/gitbld/:id/:git_id" do
|
get "/gitbld/:id/:git_id" do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get "/prjcfg/:id" do
|
||||||
|
end
|
||||||
|
|
||||||
not_found do
|
not_found do
|
||||||
status 404
|
status 404
|
||||||
@page_name = "Кто-то потерялся"
|
@page_name = "Кто-то потерялся"
|
||||||
|
|||||||
@@ -84,7 +84,20 @@ class ProjectsActions
|
|||||||
end
|
end
|
||||||
if File.exist?(configuration)
|
if File.exist?(configuration)
|
||||||
conf_path = File.join(fname, PROJECTS_STRUCTURE[:CONFIGS], "#{project_name}.cfg")
|
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)
|
@error = @db.proj_create(project_name, description)
|
||||||
if @error.nil?
|
if @error.nil?
|
||||||
created = true
|
created = true
|
||||||
|
|||||||
Reference in New Issue
Block a user