Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/updateserver/templates/update_update_manifests.erb

Issue 5071748311547904: Issue 1094 - Generate update manifests on the update server (Closed)
Patch Set: Run as user sitescripts Created July 25, 2014, 2:17 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/updateserver/templates/update_update_manifests.erb
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/updateserver/templates/update_update_manifests.erb
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+lock_file="<%= sitescripts_var_dir %>/update_update_manifests.lock"
+
+exec 9>"$lock_file"
+flock -n 9 || exit 0
+
+<% repositories_to_sync.each do |repository| %>
+hg pull -q -R "<%= sitescripts_var_dir %>/<%= repository %>"
+<% end %>
+
+export PYTHONPATH=/opt/sitescripts
+python -m sitescripts.extensions.bin.updateUpdateManifests
+
+rm -f "$lock_file"
« modules/updateserver/manifests/init.pp ('K') | « modules/updateserver/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld