Skip to content

Commit 17aca66

Browse files
committed
update prerelease workflow to match >= and == patterns for hfh dep
1 parent 0fb0fc8 commit 17aca66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/python-prerelease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ jobs:
6262
# Create and checkout new branch
6363
git checkout -b $BRANCH_NAME
6464
65-
# Update dependencies using sed
66-
sed -i -E "s/\"huggingface-hub>=0.*\"/\"huggingface-hub==${VERSION}\"/" setup.py
65+
# Update dependencies using sed - match both >= and == patterns
66+
sed -i -E "s/\"huggingface-hub(>=|==)[^\"]*\"/\"huggingface-hub==${VERSION}\"/" setup.py
6767
git add setup.py
6868
6969
# Only if the target repo is transformers
7070
if [ "${{ matrix.target-repo }}" = "transformers" ]; then
71-
sed -i -E "s/\"huggingface-hub>=0.*\"/\"huggingface-hub==${VERSION}\"/" src/transformers/dependency_versions_table.py
71+
sed -i -E "s/\"huggingface-hub(>=|==)[^\"]*\"/\"huggingface-hub==${VERSION}\"/" src/transformers/dependency_versions_table.py
7272
git add src/transformers/dependency_versions_table.py
7373
fi
7474

0 commit comments

Comments
 (0)