代码拉取完成,页面将自动刷新
#!/usr/bin/python
# -*- coding:utf-8 -*-
from __future__ import print_function
import sys
from argparse import ArgumentParser
from freeline_core.dispatcher import Dispatcher
from freeline_core.init import init
class Freeline(object):
def __init__(self):
self.dispatcher = Dispatcher()
def call(self, args=None):
if 'init' in args and args.init:
print('init freeline project...')
init()
exit()
self.dispatcher.call_command(args)
def get_parser():
parser = ArgumentParser()
parser.add_argument('-v', '--version', action='store_true', help='show version')
parser.add_argument('-f', '--cleanBuild', action='store_true', help='force to execute a clean build')
parser.add_argument('-w', '--wait', action='store_true', help='make application wait for debugger')
parser.add_argument('-a', '--all', action='store_true',
help="together with '-f', freeline will force to clean build all projects.")
parser.add_argument('-c', '--clean', action='store_true', help='clean cache directory and workspace')
parser.add_argument('-d', '--debug', action='store_true', help='show freeline debug output (NOT DEBUG APPLICATION)')
# parser.add_argument('-i', '--init', action='store_true', help='init freeline project')
parser.parse_args()
return parser
def main():
if sys.version_info > (3, 0):
print('Freeline only support Python 2.7+ now. Please use the correct version of Python for freeline.')
exit()
parser = get_parser()
args = parser.parse_args()
freeline = Freeline()
freeline.call(args=args)
if __name__ == '__main__':
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。