client: add info

This commit is contained in:
JerryXiao 2019-04-10 20:51:34 +08:00
parent 7203913efc
commit 440c8568d7
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -41,12 +41,16 @@ if __name__ == '__main__':
configure_logger(logger) configure_logger(logger)
try: try:
parser = argparse.ArgumentParser(description='Client for buildbot') parser = argparse.ArgumentParser(description='Client for buildbot')
parser.add_argument('--info', action='store_true', help='show buildbot info')
parser.add_argument('--update', action='store_true', help='update pushed files to the repo') parser.add_argument('--update', action='store_true', help='update pushed files to the repo')
parser.add_argument('--cleanall', action='store_true', help='checkout pkgbuilds') parser.add_argument('--cleanall', action='store_true', help='checkout pkgbuilds')
parser.add_argument('--clean', nargs='?', default=None, help='checkout pkgbuilds in one package') parser.add_argument('--clean', nargs='?', default=None, help='checkout pkgbuilds in one package')
parser.add_argument('--rebuild', nargs='?', default=None, help='rebuild a package with its dirname') parser.add_argument('--rebuild', nargs='?', default=None, help='rebuild a package with its dirname')
args = parser.parse_args() args = parser.parse_args()
if args.update: if args.info:
server=(MASTER_BIND_ADDRESS, MASTER_BIND_PASSWD)
logger.info(run('info', server=server))
elif args.update:
server=(REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD) server=(REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD)
logger.info(run('update', kwargs={'overwrite': False}, server=server)) logger.info(run('update', kwargs={'overwrite': False}, server=server))
elif args.cleanall: elif args.cleanall: