Example #1
0
def main(args):
    if not os.path.exists(config.cwd()):
        cli.error(
            "%s does not exist\n"
            "Try specifying a different directory."
            % cmd_impl_support.cwd_desc(config.cwd()))
    package_file = guildfile.guildfile_path()
    if not os.path.exists(package_file):
        cli.error(
            "%s does not contain a guild.yml file\n"
            "A guild.yml file is required when creating a package. Create one "
            "in this directory first or try specifying a different directory."
            % cmd_impl_support.cwd_desc(config.cwd()))
    if args.upload:
        _check_upload_support(package_file)
    package.create_package(
        package_file,
        dist_dir=args.dist_dir,
        upload_repo=args.upload,
        sign=args.sign,
        identity=args.identity,
        user=args.user,
        password=args.password,
        skip_existing=args.skip_existing,
        comment=args.comment)
Example #2
0
def create_package(args):
    package_file = os.path.join(config.cwd(), "PACKAGE")
    if not os.path.exists(package_file):
        cli.error("%s does not contain a PACKAGE file\n"
                  "Try specifying a different directory." %
                  cmd_impl_support.cwd_desc(config.cwd()))
    package.create_package(package_file,
                           dist_dir=args.dist_dir,
                           upload_repo=args.upload,
                           sign=args.sign,
                           identity=args.identity,
                           user=args.user,
                           password=args.password,
                           comment=args.comment)
Example #3
0
def main(args):
    package_file = os.path.join(config.cwd(), "guild.yml")
    if not os.path.exists(package_file):
        cli.error("%s does not contain a guild.yml file\n"
                  "Try specifying a different directory." %
                  cmd_impl_support.cwd_desc(config.cwd()))
    _check_upload_config(package_file, args)
    package.create_package(package_file,
                           dist_dir=args.dist_dir,
                           upload_repo=args.upload,
                           sign=args.sign,
                           identity=args.identity,
                           user=args.user,
                           password=args.password,
                           skip_existing=args.skip_existing,
                           comment=args.comment)