Skip to content

Commit

Permalink
release.py: update package deps correctly w/ only/exclude
Browse files Browse the repository at this point in the history
When updating dependent package versions, skip packages excluded by
only/exclude.
  • Loading branch information
suvayu committed May 15, 2024
1 parent ea98743 commit 7a71288
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions orchestra/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,16 @@ def update_pkg_deps(repo: Repo, next_versions: dict[str, str]):
for i, dep in enumerate(dependencies):
if dep_match := CONF["pkgname_re"].match(dep):
pkg_ = dep_match.group()
next_ver = next_versions[pkg_]
dependencies[i] = f"{pkg_}>={next_ver}"
try:
next_ver = next_versions[pkg_]
except KeyError:
if pkg_ not in CONF["repos"]:
# packages excluded by only/exclude
continue
else:
raise # unexpected
else:
dependencies[i] = f"{pkg_}>={next_ver}"
write_toml(project, pyproject_toml)


Expand Down

0 comments on commit 7a71288

Please sign in to comment.