Changeset View
Changeset View
Standalone View
Standalone View
contrib/gitian-build.py
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | def main(): | ||||
parser.add_argument('-u', '--url', dest='url', default='https://github.com/Bitcoin-ABC/bitcoin-abc.git', | parser.add_argument('-u', '--url', dest='url', default='https://github.com/Bitcoin-ABC/bitcoin-abc.git', | ||||
help='Specify the URL of the repository. Default is %(default)s') | help='Specify the URL of the repository. Default is %(default)s') | ||||
parser.add_argument('-v', '--verify', action='store_true', | parser.add_argument('-v', '--verify', action='store_true', | ||||
dest='verify', help='Verify the Gitian build') | dest='verify', help='Verify the Gitian build') | ||||
parser.add_argument('-b', '--build', action='store_true', | parser.add_argument('-b', '--build', action='store_true', | ||||
dest='build', help='Do a Gitian build') | dest='build', help='Do a Gitian build') | ||||
parser.add_argument('-s', '--sign', action='store_true', dest='sign', | parser.add_argument('-s', '--sign', action='store_true', dest='sign', | ||||
help='Make signed binaries for Windows and MacOS') | help='Make signed binaries for Windows and MacOS') | ||||
parser.add_argument('-B', '--buildsign', action='store_true', | |||||
dest='buildsign', help='Build both signed and unsigned binaries') | |||||
parser.add_argument('-o', '--os', dest='os', default='lwm', | parser.add_argument('-o', '--os', dest='os', default='lwm', | ||||
help='Specify which Operating Systems the build is for. Default is %(default)s. l for Linux, w for Windows, m for MacOS') | help='Specify which Operating Systems the build is for. Default is %(default)s. l for Linux, w for Windows, m for MacOS') | ||||
parser.add_argument('-j', '--jobs', dest='jobs', default=str(num_cpus), | parser.add_argument('-j', '--jobs', dest='jobs', default=str(num_cpus), | ||||
help='Number of processes to use. Default %(default)s') | help='Number of processes to use. Default %(default)s') | ||||
parser.add_argument('-m', '--memory', dest='memory', default='3500', | parser.add_argument('-m', '--memory', dest='memory', default='3500', | ||||
help='Memory to allocate in MiB. Default %(default)s') | help='Memory to allocate in MiB. Default %(default)s') | ||||
parser.add_argument('-k', '--kvm', action='store_true', | parser.add_argument('-k', '--kvm', action='store_true', | ||||
dest='kvm', help='Use KVM instead of LXC') | dest='kvm', help='Use KVM instead of LXC') | ||||
Show All 15 Lines | def main(): | ||||
args.linux = 'l' in args.os | args.linux = 'l' in args.os | ||||
args.windows = 'w' in args.os | args.windows = 'w' in args.os | ||||
args.macos = 'm' in args.os | args.macos = 'm' in args.os | ||||
args.is_bionic = b'bionic' in subprocess.check_output( | args.is_bionic = b'bionic' in subprocess.check_output( | ||||
['lsb_release', '-cs']) | ['lsb_release', '-cs']) | ||||
if args.buildsign: | |||||
args.build = True | |||||
args.sign = True | |||||
if args.kvm and args.docker: | if args.kvm and args.docker: | ||||
raise Exception('Error: cannot have both kvm and docker') | raise Exception('Error: cannot have both kvm and docker') | ||||
args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign' | args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign' | ||||
# Set environment variable USE_LXC or USE_DOCKER, let gitian-builder know that we use lxc or docker | # Set environment variable USE_LXC or USE_DOCKER, let gitian-builder know that we use lxc or docker | ||||
if args.docker: | if args.docker: | ||||
os.environ['USE_DOCKER'] = '1' | os.environ['USE_DOCKER'] = '1' | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |