コード例 #1
0
def setup_webdir_if_it_doesnt_exist(ctx):
    if is_web_app(ctx):
        webdirPath = os.path.join(ctx['BUILD_DIR'], ctx['WEBDIR'])
        if not os.path.exists(webdirPath):
            directory_fuzzy_pattern = '^%s/.*$'
            file_exact_pattern = '^%s$'
            fu = FileUtil(FakeBuilder(ctx), move=True)
            fu.under('BUILD_DIR')
            fu.into('WEBDIR')
            fu.where_name_does_not_match(directory_fuzzy_pattern %
                                         os.path.join(ctx['BUILD_DIR'], '.bp'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern %
                os.path.join(ctx['BUILD_DIR'], '.extensions'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern %
                os.path.join(ctx['BUILD_DIR'], '.bp-config'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern %
                os.path.join(ctx['BUILD_DIR'], ctx['LIBDIR']))
            fu.where_name_does_not_match(
                file_exact_pattern %
                os.path.join(ctx['BUILD_DIR'], 'manifest.yml'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern %
                os.path.join(ctx['BUILD_DIR'], '.profile.d'))
            fu.where_name_does_not_match(
                file_exact_pattern %
                os.path.join(ctx['BUILD_DIR'], '.profile'))
            fu.done()
コード例 #2
0
def setup_htdocs_if_it_doesnt_exist(ctx):
    htdocsPath = os.path.join(ctx['BUILD_DIR'], 'htdocs')
    if not os.path.exists(htdocsPath):
        fu = FileUtil(FakeBuilder(ctx), move=True)
        fu.under('BUILD_DIR')
        fu.into('htdocs')
        fu.where_name_does_not_match(
            '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp'))
        fu.where_name_does_not_match(
            '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.extensions'))
        fu.where_name_does_not_match(
            '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp-config'))
        fu.where_name_does_not_match(
            '^%s.*$' % os.path.join(ctx['BUILD_DIR'], 'lib'))
        fu.done()
コード例 #3
0
def setup_webdir_if_it_doesnt_exist(ctx):
    if is_web_app(ctx):
        webdirPath = os.path.join(ctx['BUILD_DIR'], ctx['WEBDIR'])
        if not os.path.exists(webdirPath):
            fu = FileUtil(FakeBuilder(ctx), move=True)
            fu.under('BUILD_DIR')
            fu.into('WEBDIR')
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.extensions'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp-config'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], 'manifest.yml'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], ctx['LIBDIR']))
            fu.done()
コード例 #4
0
ファイル: compile_helpers.py プロジェクト: manhkhoaa/cfphp
def setup_htdocs_if_it_doesnt_exist(ctx):
    if is_web_app(ctx):
        htdocsPath = os.path.join(ctx['BUILD_DIR'], 'htdocs')
        if not os.path.exists(htdocsPath):
            fu = FileUtil(FakeBuilder(ctx), move=True)
            fu.under('BUILD_DIR')
            fu.into('htdocs')
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.extensions'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp-config'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], 'manifest.yml'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], 'lib'))
            fu.done()
コード例 #5
0
def setup_htdocs_if_it_doesnt_exist(ctx):
    if is_web_app(ctx):
        htdocsPath = os.path.join(ctx['BUILD_DIR'], 'htdocs')
        if not os.path.exists(htdocsPath):
            fu = FileUtil(FakeBuilder(ctx), move=True)
            fu.under('BUILD_DIR')
            fu.into('htdocs')
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.extensions'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], '.bp-config'))
            fu.where_name_does_not_match(
                '^%s.*$' % os.path.join(ctx['BUILD_DIR'], 'manifest.yml'))
            #fu.where_name_does_not_match(
                #'^%s.*[^s]$' % os.path.join(ctx['BUILD_DIR'], 'lib'))
                # Match lib but not libs for Piwik Support
            fu.done()
コード例 #6
0
def setup_webdir_if_it_doesnt_exist(ctx):
    if is_web_app(ctx):
        webdirPath = os.path.join(ctx['BUILD_DIR'], ctx['WEBDIR'])
        if not os.path.exists(webdirPath):
            directory_fuzzy_pattern = '^%s/.*$'
            file_exact_pattern = '^%s$'
            fu = FileUtil(FakeBuilder(ctx), move=True)
            fu.under('BUILD_DIR')
            fu.into('WEBDIR')
            fu.where_name_does_not_match(
                directory_fuzzy_pattern % os.path.join(ctx['BUILD_DIR'], '.bp'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern % os.path.join(ctx['BUILD_DIR'], '.extensions'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern % os.path.join(ctx['BUILD_DIR'], '.bp-config'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern % os.path.join(ctx['BUILD_DIR'], ctx['LIBDIR']))
            fu.where_name_does_not_match(
                file_exact_pattern % os.path.join(ctx['BUILD_DIR'], 'manifest.yml'))
            fu.where_name_does_not_match(
                directory_fuzzy_pattern % os.path.join(ctx['BUILD_DIR'], '.profile.d'))
            fu.where_name_does_not_match(
                file_exact_pattern % os.path.join(ctx['BUILD_DIR'], '.profile'))
            fu.done()