Exemplo n.º 1
0
 def __init__(self,
              env,
              git_repository_path,
              release_area,
              mirror_path,
              build_tools_repo_path=None,
              run_in_repository=False,
              tag_name=None,
              test_uri=None):
     self._release_area = release_area
     self._release_dir = release_dir = os.path.join(release_area, "release")
     self._opt_dir = os.path.join(release_dir, "opt")
     self._bin_dir = os.path.join(self._opt_dir, "bin")
     AddToPathEnv = release.make_env_maker(release.add_to_path_cmd)
     self._env = AddToPathEnv(release.GitPagerWrapper(env), self._bin_dir)
     self._source_repo_path = git_repository_path
     self._in_source_repo = release.CwdEnv(self._env,
                                           self._source_repo_path)
     self._tag_name = tag_name
     self._set_next_release_version()
     self._clone_path = os.path.join(release_dir, "clone")
     self._in_clone = release.CwdEnv(self._env, self._clone_path)
     if run_in_repository:
         self._in_repo = self._in_source_repo
         self._repo_path = self._source_repo_path
     else:
         self._in_repo = self._in_clone
         self._repo_path = self._clone_path
     self._docs_dir = os.path.join(self._repo_path, "docs")
     self._in_docs_dir = release.CwdEnv(self._env, self._docs_dir)
     self._in_release_dir = release.CwdEnv(self._env, self._release_dir)
     self._build_tools_path = build_tools_repo_path
     if self._build_tools_path is not None:
         self._website_source_path = os.path.join(self._build_tools_path,
                                                  "website")
     self._mirror_path = mirror_path
     self._in_mirror = release.CwdEnv(self._env, self._mirror_path)
     self._css_validator_path = "css_validator"
     self._test_uri = test_uri
     self._test_deps_dir = os.path.join(release_dir, "test_deps")
     self._easy_install_test_dir = os.path.join(release_dir,
                                                "easy_install_test")
     self._in_easy_install_dir = release.CwdEnv(self._env,
                                                self._easy_install_test_dir)
     # prevent anything other than functional test dependencies being on
     # sys.path due to cwd or PYTHONPATH
     self._easy_install_env = clean_environ_env(
         release.CwdEnv(env, self._test_deps_dir))
     self._zope_testbrowser_dir = os.path.join(release_dir,
                                               "zope_testbrowser_test")
Exemplo n.º 2
0
 def __init__(self, env, git_repository_path, release_area, mirror_path,
              build_tools_repo_path=None, run_in_repository=False,
              tag_name=None, test_uri=None):
     self._release_area = release_area
     self._release_dir = release_dir = os.path.join(release_area, "release")
     self._opt_dir = os.path.join(release_dir, "opt")
     self._bin_dir = os.path.join(self._opt_dir, "bin")
     AddToPathEnv = release.make_env_maker(add_to_path_cmd)
     self._env = AddToPathEnv(release.GitPagerWrapper(env), self._bin_dir)
     self._source_repo_path = git_repository_path
     self._in_source_repo = release.CwdEnv(self._env,
                                           self._source_repo_path)
     self._previous_version, self._release_version = \
         self._get_next_release_version()
     if tag_name is not None:
         self._release_version = release.parse_version(tag_name)
     self._source_distributions = self._get_source_distributions(
         self._release_version)
     self._clone_path = os.path.join(release_dir, "clone")
     self._in_clone = release.CwdEnv(self._env, self._clone_path)
     if run_in_repository:
         self._in_repo = self._in_source_repo
         self._repo_path = self._source_repo_path
     else:
         self._in_repo = self._in_clone
         self._repo_path = self._clone_path
     self._docs_dir = os.path.join(self._repo_path, "docs")
     self._in_docs_dir = release.CwdEnv(self._env, self._docs_dir)
     self._in_release_dir = release.CwdEnv(self._env, self._release_dir)
     self._build_tools_path = build_tools_repo_path
     if self._build_tools_path is not None:
         self._website_source_path = os.path.join(self._build_tools_path,
                                                  "website")
     self._mirror_path = mirror_path
     self._in_mirror = release.CwdEnv(self._env, self._mirror_path)
     self._css_validator_path = "css_validator"
     self._test_uri = test_uri
     self._test_deps_dir = os.path.join(release_dir, "test_deps")
     self._easy_install_test_dir = os.path.join(release_dir,
                                                "easy_install_test")
     self._in_easy_install_dir = release.CwdEnv(self._env,
                                                self._easy_install_test_dir)
     # prevent anything other than functional test dependencies being on
     # sys.path due to cwd or PYTHONPATH
     self._easy_install_env = clean_environ_env(
         release.CwdEnv(env, self._test_deps_dir))
     self._zope_testbrowser_dir = os.path.join(release_dir,
                                               "zope_testbrowser_test")