X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a0a7f905806cea4a97b2121adfee1beb995a1d61..10c13d4a2f1550d1b8e85d4284f60d9be974bef0:/cookbooks/mediawiki/resources/site.rb diff --git a/cookbooks/mediawiki/resources/site.rb b/cookbooks/mediawiki/resources/site.rb index 2fc1ed115..d3fd852ee 100644 --- a/cookbooks/mediawiki/resources/site.rb +++ b/cookbooks/mediawiki/resources/site.rb @@ -109,8 +109,6 @@ action :create do mode "775" end - mediawiki_reference = "REL#{new_resource.version}".tr(".", "_") - git mediawiki_directory do action :sync repository "https://gerrit.wikimedia.org/r/mediawiki/core.git" @@ -458,6 +456,13 @@ action :create do update_site false end + mediawiki_extension "OSMCALWikiWidget" do + site new_resource.site + repository "https://github.com/thomersch/OSMCALWikiWidget.git" + tag "live" + update_site false + end + mediawiki_extension "SimpleMap" do site new_resource.site template "mw-ext-SimpleMap.inc.php.erb" @@ -608,6 +613,17 @@ action_class do new_resource.directory || "/srv/#{new_resource.site}" end + def mediawiki_reference + shell_out!("git", "ls-remote", "--refs", "--sort=-version:refname", + "https://gerrit.wikimedia.org/r/mediawiki/core.git", + "refs/tags/#{new_resource.version}.*") + .stdout + .split("\n") + .first + .split("/") + .last + end + def cron_name new_resource.site.tr(".", "_") end