Update the JavaScript dependency installation code to handle scoped packages. The code is also updated to use pathlib's Path. Move the JavaScript dependency installation to its own app named dependencies. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
from __future__ import unicode_literals
|
|
|
|
from django.core import management
|
|
from django.core.management.base import CommandError
|
|
|
|
from ...signals import perform_upgrade, post_upgrade, pre_upgrade
|
|
|
|
|
|
class Command(management.BaseCommand):
|
|
help = 'Performs the required steps after a version upgrade.'
|
|
|
|
def handle(self, *args, **options):
|
|
try:
|
|
pre_upgrade.send(sender=self)
|
|
except Exception as exception:
|
|
raise CommandError(
|
|
'Error during pre_upgrade signal: %s, %s' % (
|
|
exception, type(exception)
|
|
)
|
|
)
|
|
|
|
try:
|
|
perform_upgrade.send(sender=self)
|
|
except Exception as exception:
|
|
raise CommandError(
|
|
'Error during perform_upgrade signal; %s, %s' % (
|
|
exception, type(exception)
|
|
)
|
|
)
|
|
|
|
try:
|
|
post_upgrade.send(sender=self)
|
|
except Exception as exception:
|
|
raise CommandError(
|
|
'Error during post_upgrade signal; %s, %s' % (
|
|
exception, type(exception)
|
|
)
|
|
)
|