コード例 #1
0
ファイル: ifolder.py プロジェクト: a1ip/checkio-cli
 def run(options):
     mission_git_getter(options.url, options.mission)
     recompile_mission(options.mission)
     if not options.without_container:
         rebuild_mission(options.mission)
     init_home_file(options.mission, settings.INTERPRETER)
     rebuild_native(options.mission)
     tools.set_value('mission', options.mission)
コード例 #2
0
ファイル: ifolder.py プロジェクト: a1ip/checkio-cli
 def run(options):
     if options.filename is None:
         return init_home_file(settings.MISSION, settings.INTERPRETER)
     if '.' in options.filename:
         mission, interpreter = tools.set_mi(options.mission, options.interpreter)
         return init_path_file(options.filename, mission, interpreter)
     # --------------------mission-slug, ----interpreter-name
     mission, interpreter = tools.set_mi(options.filename, options.mission)
     return init_home_file(mission, interpreter)
コード例 #3
0
ファイル: ifolder.py プロジェクト: a1ip/checkio-cli
    def run(options):
        try:
            make_mission_from_template(options.mission, options.template)
        except TemplateWasntFound as e:
            print(e)
            return
        except MissionFolderExistsAlready as e:
            print(e)
            answer = raw_input('Would you like to remove this folder? y/n').strip().lower()
            if answer == 'n':
                return
            if answer in ['', 'y']:
                make_mission_from_template(options.mission, options.template, force_remove=True)

        if options.origin:
            mission_git_init(options.mission, options.origin)

        recompile_mission(options.mission)
        if not options.without_container:
            rebuild_mission(options.mission)
        init_home_file(options.mission, settings.INTERPRETER)
        rebuild_native(options.mission)
        tools.set_value('mission', options.mission)