e0eae1b4a4 Make --setup command independent (Hennadii Stepanov)
Pull request description:
This PR allows a user to run:
```sh
./gitian-build.py --setup
```
without unused `signer` and `version` options.
In master the `signer` and `version` options are mandatory. This implies the following code is dead:
387eb5b343/contrib/gitian-build.py (L192-L200)
This PR fixes those lines of code.
Also this PR has a nice side effect: there is no more warnings about macOS build during processing `--setup` command. Ref: https://github.com/bitcoin/bitcoin/pull/13998#issuecomment-493691117
Note: https://github.com/bitcoin-core/docs/blob/master/gitian-building.md will be updated when this PR is merged.
ACKs for commit e0eae1:
Tree-SHA512: df851fe461e402229c57b410f30f1d8bc816e8a2600ece4249aa39c763566de5b661e7aa0af171d484727eb463a6d0e10cfcf459aa60ae1a5d4e12974a8615c6
parser=argparse.ArgumentParser(description='Script for running full Gitian builds.')
parser.add_argument('-c','--commit',action='store_true',dest='commit',help='Indicate that the version argument is for a commit or branch')
parser.add_argument('-p','--pull',action='store_true',dest='pull',help='Indicate that the version argument is the number of a github repository pull request')
parser.add_argument('-u','--url',dest='url',default='https://github.com/bitcoin/bitcoin',help='Specify the URL of the repository. Default is %(default)s')
@ -168,27 +168,17 @@ def main():
parser.add_argument('-S','--setup',action='store_true',dest='setup',help='Set up the Gitian building environment. Only works on Debian-based systems (Ubuntu, Debian)')
parser.add_argument('-D','--detach-sign',action='store_true',dest='detach_sign',help='Create the assert file for detached signing. Will not commit anything.')
parser.add_argument('-n','--no-commit',action='store_false',dest='commit_files',help='Do not commit anything to git')
parser.add_argument('signer', help='GPG signer to sign each build assert file')
parser.add_argument('version', help='Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified')
parser.add_argument('signer',nargs='?',help='GPG signer to sign each build assert file')
parser.add_argument('version',nargs='?',help='Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified')