Skip to content

Commit d23dbf4

Browse files
authored
fix(update-version): make numba-cuda upper pin creation idempotent (#23815)
While working on a hotfix release, I had to stop and manually update some upper-pins, since `numba-cuda` had duplicate upper-pins added, e.g. ``` numba-cuda>=0.22.2,<0.31.0,<0.31.0 ``` This is because the `update-version.sh` script looks only for the `>=` bound when adding the upper pin in. This is usually not a problem, but does cause issues when applying `update-version.sh` as a hotfix. This PR checks for an optional pre-existing upper bound and doesn't add on a second upper bound. Authors: - Gil Forsyth (https://github.com/gforsyth) Approvers: - Bradley Dice (https://github.com/bdice) URL: #23815
1 parent a804bfe commit d23dbf4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ci/release/update-version.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ except Exception:
125125
for FILE in dependencies.yaml conda/recipes/cudf/recipe.yaml; do
126126
for f in $FILE; do
127127
[[ -f "$f" ]] || continue
128-
sed_runner "s/numba-cuda>=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*/numba-cuda${NUMBA_CUDA_SPEC}/g" "$f"
129-
sed_runner "s/numba-cuda\[cu12\]>=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*/numba-cuda[cu12]${NUMBA_CUDA_SPEC}/g" "$f"
130-
sed_runner "s/numba-cuda\[cu13\]>=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*/numba-cuda[cu13]${NUMBA_CUDA_SPEC}/g" "$f"
131-
sed_runner "s/numba-cuda >=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*/numba-cuda ${NUMBA_CUDA_SPEC}/g" "$f"
128+
sed_runner "s/numba-cuda>=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\(,<[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\)\?/numba-cuda${NUMBA_CUDA_SPEC}/g" "$f"
129+
sed_runner "s/numba-cuda\[cu12\]>=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\(,<[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\)\?/numba-cuda[cu12]${NUMBA_CUDA_SPEC}/g" "$f"
130+
sed_runner "s/numba-cuda\[cu13\]>=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\(,<[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\)\?/numba-cuda[cu13]${NUMBA_CUDA_SPEC}/g" "$f"
131+
sed_runner "s/numba-cuda >=[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\(,<[0-9]\+\.[0-9]\+\.[0-9][0-9.]*\)\?/numba-cuda ${NUMBA_CUDA_SPEC}/g" "$f"
132132
done
133133
done
134134
else

0 commit comments

Comments
 (0)