Exemplo n.º 1
0
from fabric.context_managers import cd
from sitesetup.fab.config import config, production_config
from fabric.decorators import task
from fabric.contrib.files import exists
from fabric.operations import sudo

from sitesetup.fab.config import init_file
from sitesetup.fab import detail
from sitesetup.fab.tasks import staging, production

# Most settings can be configured in fabfile.cfg
init_file('fabfile.cfg')

@task
def init():
    detail.initial_create_srv_dir()
    detail.switch_and_buildout()
    detail.initial_nginx_symlinks()


@task
def build_js_dist():
    if not exists(config('basedir')):
        print("Directory %s doesn't exist yet" % config('basedir'))
        print("Run fabric with the 'create_srv_dir' command.")
    with cd(config('basedir')):
    # sudo('cd /srv/test.dijkdata.nl', user='******')
        sudo('npm install', user='******')
        sudo('grunt build', user='******')

@task
Exemplo n.º 2
0
# (c) Nelen & Schuurmans.  GPL licensed, see LICENSE.rst.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function

from sitesetup.fab.config import init_file
from sitesetup.fab.tasks import *

# Most settings can be configured in fabfile.cfg
init_file('fabfile.cfg')