'Builds a Halyard debian with distribution as \'trusty-stable\'.'

def __build_halyard(self):

    jarRepo = self.__options.jar_repo
    parts = self.__options.bintray_repo.split('/')
    if (len(parts) != 2):
        raise ValueError('Expected    --bintray_repo    to    be    in    the    form    <owner>/<repo>')
    (org, packageRepo) = (parts[0], parts[1])
    bintray_key = os.environ['BINTRAY_KEY']
    bintray_user = os.environ['BINTRAY_USER']
    extra_args = ['--debug', '-Prelease.useLastTag=true', '-PbintrayPackageBuildNumber={number}'.format(number=self.__build_number), '-PbintrayOrg="{org}"'.format(org=org), '-PbintrayPackageRepo="{repo}"'.format(repo=packageRepo), '-PbintrayJarRepo="{jarRepo}"'.format(jarRepo=jarRepo), '-PbintrayKey="{key}"'.format(key=bintray_key), '-PbintrayUser="{user}"'.format(user=bintray_user), '-PbintrayPackageDebDistribution=trusty-stable']
    cmds = ['./gradlew    {extra}    candidate'.format(extra='    '.join(extra_args))]
    run_shell_and_log(cmds, 'halyard-debian-build.log', cwd='halyard')
