Changeset View
Changeset View
Standalone View
Standalone View
contrib/gitian-build.py
Show First 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | def main(): | ||||
# Add leading 'v' for tags | # Add leading 'v' for tags | ||||
if args.commit and args.pull: | if args.commit and args.pull: | ||||
raise Exception('Cannot have both commit and pull') | raise Exception('Cannot have both commit and pull') | ||||
args.commit = ('' if args.commit else 'v') + args.version | args.commit = ('' if args.commit else 'v') + args.version | ||||
if args.setup: | if args.setup: | ||||
setup() | setup() | ||||
os.chdir('bitcoin') | os.chdir('bitcoin-abc') | ||||
if args.pull: | if args.pull: | ||||
subprocess.check_call( | subprocess.check_call( | ||||
['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge']) | ['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge']) | ||||
os.chdir('../gitian-builder/inputs/bitcoin') | os.chdir('../gitian-builder/inputs/bitcoin') | ||||
subprocess.check_call( | subprocess.check_call( | ||||
['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge']) | ['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge']) | ||||
args.commit = subprocess.check_output( | args.commit = subprocess.check_output( | ||||
['git', 'show', '-s', '--format=%H', 'FETCH_HEAD'], universal_newlines=True, encoding='utf8').strip() | ['git', 'show', '-s', '--format=%H', 'FETCH_HEAD'], universal_newlines=True, encoding='utf8').strip() | ||||
Show All 18 Lines |