mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 04:27:27 +03:00
update-python-libraries: fix updating packages without src.fetcher
This commit is contained in:
parent
16e401f018
commit
5c85fb3ce1
@ -275,16 +275,17 @@ def _get_latest_version_github(attr_path, package, extension, current_version, t
|
||||
release = next(filter(lambda x: strip_prefix(x["tag_name"]) == version, releases))
|
||||
prefix = get_prefix(release["tag_name"])
|
||||
|
||||
# some attributes require using the fetchgit
|
||||
git_fetcher_args = []
|
||||
if _get_attr_value(f"{attr_path}.src.fetchSubmodules"):
|
||||
git_fetcher_args.append("--fetch-submodules")
|
||||
if _get_attr_value(f"{attr_path}.src.fetchLFS"):
|
||||
git_fetcher_args.append("--fetch-lfs")
|
||||
if _get_attr_value(f"{attr_path}.src.leaveDotGit"):
|
||||
git_fetcher_args.append("--leave-dotGit")
|
||||
fetcher = _get_attr_value(f"{attr_path}.src.fetcher")
|
||||
if fetcher is not None and fetcher.endswith("nix-prefetch-git"):
|
||||
# some attributes require using the fetchgit
|
||||
git_fetcher_args = []
|
||||
if _get_attr_value(f"{attr_path}.src.fetchSubmodules"):
|
||||
git_fetcher_args.append("--fetch-submodules")
|
||||
if _get_attr_value(f"{attr_path}.src.fetchLFS"):
|
||||
git_fetcher_args.append("--fetch-lfs")
|
||||
if _get_attr_value(f"{attr_path}.src.leaveDotGit"):
|
||||
git_fetcher_args.append("--leave-dotGit")
|
||||
|
||||
if git_fetcher_args or _get_attr_value(f"{attr_path}.src.fetcher").endswith("nix-prefetch-git"):
|
||||
algorithm = "sha256"
|
||||
cmd = [
|
||||
"nix-prefetch-git",
|
||||
|
Loading…
Reference in New Issue
Block a user