parameters: (repo: str, version: List[int])
return_statement: return result
docstring: Create an archive of the current git branch.
      This method uses tar instead of git archive, as the latter
      does not include submodules. Obviously, git hidden directories
      are omitted.
  
      :param repo: Repository to archive
      :param version: Library version
  
      :return: Return the exit code of the command
docstring_summary: Create an archive of the current git branch.
      This method uses tar instead of git archive, as the latter
      does not include submodules. Obviously, git hidden directories
      are omitted.
docstring_tokens: Create an archive of the current git branch . This method uses tar instead of git archive as the latter does not include submodules . Obviously git hidden directories are omitted .
function: def git_archive(repo: str, version: List[int]) -> int:
      """
      Create an archive of the current git branch.
      This method uses tar instead of git archive, as the latter
      does not include submodules. Obviously, git hidden directories
      are omitted.
  
      :param repo: Repository to archive
      :param version: Library version
  
      :return: Return the exit code of the command
      """
      version_str = f"{version[0]}.{version[1]}.{version[2]}"
      os.chdir(packaging_root_path)
      os.rename(os.path.join(packaging_root_path, package_name), os.path.join(packaging_root_path, f"{repo}-{version_str}"))
      result = subprocess.call(f"tar cvzf {repo}_{version_str}.orig.tar.gz --exclude='.git' {repo}-{version_str}", shell=True)
      os.rename(os.path.join(packaging_root_path, f"{repo}-{version_str}"), os.path.join(packaging_root_path, package_name))
      os.chdir(os.path.join(packaging_root_path, package_name))
      return result
function_tokens: def git_archive ( repo : str , version : List [ int ] ) -> int : version_str = f"{version[0]}.{version[1]}.{version[2]}" os . chdir ( packaging_root_path ) os . rename ( os . path . join ( packaging_root_path , package_name ) , os . path . join ( packaging_root_path , f"{repo}-{version_str}" ) ) result = subprocess . call ( f"tar cvzf {repo}_{version_str}.orig.tar.gz --exclude='.git' {repo}-{version_str}" , shell = True ) os . rename ( os . path . join ( packaging_root_path , f"{repo}-{version_str}" ) , os . path . join ( packaging_root_path , package_name ) ) os . chdir ( os . path . join ( packaging_root_path , package_name ) ) return result