Commits

Waldemar Kornewald  committed 96004af

added support for POST_DEPLOY_COMMANDS

  • Participants
  • Parent commits c8f21b2

Comments (0)

Files changed (1)

File management/commands/deploy.py

     PRE_DEPLOY_COMMANDS += ('generatemedia',)
 PRE_DEPLOY_COMMANDS = getattr(settings, 'PRE_DEPLOY_COMMANDS',
                               PRE_DEPLOY_COMMANDS)
+POST_DEPLOY_COMMANDS = getattr(settings, 'POST_DEPLOY_COMMANDS', ())
 
 def run_appcfg(argv):
     # We don't really want to use that one though, it just executes this one
     def run_from_argv(self, argv):
         for command in PRE_DEPLOY_COMMANDS:
             call_command(command)
-        run_appcfg(argv)
+        try:
+            run_appcfg(argv)
+        finally:
+            for command in POST_DEPLOY_COMMANDS:
+                call_command(command)