def update_homebrew(version_str: str, repository: Repository) -> None: """ Update the Homebrew file. """ archive_url = repository.get_archive_link( archive_format='tarball', ref=version_str, ) homebrew_formula_contents = get_homebrew_formula( archive_url=archive_url, head_url=repository.clone_url, ) homebrew_file = Path('dcose2e.rb') homebrew_file.write_text(homebrew_formula_contents)
def update_homebrew( homebrew_file: Path, version_str: str, repository: Repository, ) -> None: """ Update the Homebrew file. """ archive_url = repository.get_archive_link( archive_format='tarball', ref=version_str, ) homebrew_formula_contents = get_homebrew_formula( archive_url=archive_url, head_url=repository.clone_url, homebrew_recipe_filename=homebrew_file.name, ) homebrew_file.write_text(homebrew_formula_contents)