Esempio n. 1
0
 def prepare(self) -> str:
     """Mark the preparation call"""
     self.server_dir = build_router(
         self.build_dir,
         self.task_run,
         version=self.server_type,
         server_source_path=self.server_source_path,
     )
     return self.server_dir
Esempio n. 2
0
 def __compile_server(self) -> str:
     """
     Move the required task files to a specific directory to be deployed to
     heroku directly. Return the location that the packaged files are
     now prepared in.
     """
     print("Building server files...")
     heroku_server_development_root = self.__get_build_directory()
     os.makedirs(heroku_server_development_root)
     heroku_server_development_path = build_router(
         heroku_server_development_root, self.task_run)
     return heroku_server_development_path
Esempio n. 3
0
 def __compile_server(self) -> str:
     """
     Move the required task files to a specific directory to be deployed to
     ec2 directly. Return the location that the packaged files are
     now prepared in.
     """
     print("Building server files...")
     server_build_root = self.__get_build_directory()
     os.makedirs(server_build_root)
     self.server_dir = server_dir = build_router(
         server_build_root,
         self.task_run,
         version=self.server_type,
         server_source_path=self.server_source_path,
     )
     setup_path = os.path.join(SCRIPTS_DIRECTORY, self.server_type)
     setup_dest = os.path.join(server_build_root, "setup")
     shutil.copytree(setup_path, setup_dest)
     possible_node_modules = os.path.join(server_build_root, "router",
                                          "node_modules")
     if os.path.exists(possible_node_modules):
         shutil.rmtree(possible_node_modules)
     return server_dir
Esempio n. 4
0
 def prepare(self) -> str:
     """Mark the preparation call"""
     self.server_dir = build_router(self.build_dir, self.task_run)
     return self.server_dir