for argv in [["migrate"], ["collectstatic_js_reverse"], ["collectstatic", "-v", "0", "--noinput"]]:
utility = ManagementUtility(["manage.py"] + argv)
utility.execute()
James says:
So the only problem with that is the upgrader also triggers a git pull and then runs the code post git pull.
But the existing upgrade.sh could easily call git pull, and then invoke an app, and as you say, that would save the "upgrader" from having to startup VariantGrid several times for one deploy.
Consider moving the upgrade script / migrator into an app - I would say either a new "upgrade" app or potentially move it into "manual"
Advantages would be:
/etc/variantgrid
configuration to be able to turn off deploy notification on dev machinesFor instance, the following takes 22 secs on my machine:
While this takes less than 7 secs:
James says: