Commit f94904bc authored by Vagrant Cascadian's avatar Vagrant Cascadian
Browse files

support --vary=build_path.path ... partially...

Still needs work to copy the .deb from the appropriate location
parent 9ea2e4bf
Loading
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -252,10 +252,15 @@ def domain_host(ctx, build, vary):
# of the current virtual servers. (It's theoretically possible to make it work)
def build_path(ctx, build, vary):
    if vary:
        if ctx.spec.build_path.path:
            custom_path = os.path.join(ctx.spec.build_path.path)
            os.makedirs(os.path.dirname(custom_path), exist_ok=True)
            if ctx.verbosity >= 1:
                logger.info("BUILD_PATH variation: custom path = " + custom_path)
            return build.move_tree(build.tree, custom_path, True)
        else:
            return build
    const_path = os.path.join(dirname(build.tree), 'const_build_path')
    if ctx.spec.build_path.path:
        const_path = os.path.join(ctx.spec.build_path.path)
    if ctx.verbosity >= 1:
        logger.info("BUILD_PATH variation: const_path = " + const_path)
    return build.move_tree(build.tree, const_path, True)