You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #15236: scripts and tools: Make --setup command independent
e0eae1b 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:
https://github.com/bitcoin/bitcoin/blob/387eb5b34307448f16d3769ac0245c4e3d996a38/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: bitcoin/bitcoin#13998 (comment)
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.')
156
156
parser.add_argument('-c', '--commit', action='store_true', dest='commit', help='Indicate that the version argument is for a commit or branch')
157
157
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')
158
158
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():
168
168
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)')
169
169
parser.add_argument('-D', '--detach-sign', action='store_true', dest='detach_sign', help='Create the assert file for detached signing. Will not commit anything.')
170
170
parser.add_argument('-n', '--no-commit', action='store_false', dest='commit_files', help='Do not commit anything to git')
171
-
parser.add_argument('signer', help='GPG signer to sign each build assert file')
172
-
parser.add_argument('version', help='Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified')
171
+
parser.add_argument('signer', nargs='?', help='GPG signer to sign each build assert file')
172
+
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')
0 commit comments