diff --git a/site-cookbooks/kosmos_gitea/attributes/default.rb b/site-cookbooks/kosmos_gitea/attributes/default.rb index 90251d8..3fa3473 100644 --- a/site-cookbooks/kosmos_gitea/attributes/default.rb +++ b/site-cookbooks/kosmos_gitea/attributes/default.rb @@ -1,6 +1,6 @@ -gitea_version = "1.11.5" +gitea_version = "1.12.3" node.default["kosmos_gitea"]["version"] = gitea_version node.default["kosmos_gitea"]["binary_url"] = "https://dl.gitea.io/gitea/#{gitea_version}/gitea-#{gitea_version}-linux-amd64" -node.default["kosmos_gitea"]["binary_checksum"] = "d8d43c13e71596c79b541e85e29defe065b4f70ac5155e6d0212bcfc669e1b9c" +node.default["kosmos_gitea"]["binary_checksum"] = "6bfda9a12dc248360d34954b087ca6319f7310c61dc32b34c5e0675fdd45e0f4" node.default["kosmos_gitea"]["nginx"]["domain"] = "gitea.kosmos.org" node.default["kosmos_gitea"]["working_directory"] = "/var/lib/gitea" diff --git a/site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl b/site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl new file mode 100644 index 0000000..61f1c59 --- /dev/null +++ b/site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl @@ -0,0 +1,3 @@ + diff --git a/site-cookbooks/kosmos_gitea/recipes/default.rb b/site-cookbooks/kosmos_gitea/recipes/default.rb index e159833..2cc43c5 100644 --- a/site-cookbooks/kosmos_gitea/recipes/default.rb +++ b/site-cookbooks/kosmos_gitea/recipes/default.rb @@ -56,7 +56,7 @@ directory working_directory do mode "0750" end -%w(custom custom/options custom/options/label).each do |path| +%w(custom custom/options custom/options/label custom/templates custom/templates/custom).each do |path| directory "#{working_directory}/#{path}" do owner "git" group "git" @@ -70,6 +70,16 @@ cookbook_file "#{working_directory}/custom/options/label/Kosmos" do owner "git" group "git" mode "0640" + notifies :restart, "service[gitea]", :delayed +end + +# Kosmos header template +cookbook_file "#{working_directory}/custom/templates/custom/header.tmpl" do + source "custom/templates/custom/header.tmpl" + owner "git" + group "git" + mode "0640" + notifies :restart, "service[gitea]", :delayed end directory config_directory do @@ -112,6 +122,7 @@ remote_file gitea_binary_path do source node['kosmos_gitea']['binary_url'] checksum node['kosmos_gitea']['binary_checksum'] mode "0755" + notifies :restart, "service[gitea]", :delayed end execute "systemctl daemon-reload" do