Skip to content

Commit fa04600

Browse files
committed
Always relock in generate_pylock
Signed-off-by: Samuel Monson <smonson@redhat.com>
1 parent 20c290a commit fa04600

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ repos:
1212
- id: uv-lock
1313
name: check uv.lock file matches pyproject
1414
- id: uv-export
15+
name: Update pylock to match uv.lock
16+
# NOTE: Arguments should match ./scripts/generate_pylock.sh
1517
args:
1618
- "--frozen"
1719
- "--all-groups"

scripts/generate_pylock.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ while getopts "fh" opt; do
2727
done
2828

2929
if [ $FORCE_REGEN -eq 1 ]; then
30-
uv lock --refresh
30+
uv lock -U
31+
else
32+
uv lock
3133
fi
32-
uv export --frozen --all-groups --all-extras --format=pylock.toml --output-file=pylock.toml --quiet
34+
# NOTE: Ensure pre-commit config uses same arguments
35+
uv export \
36+
--frozen \
37+
--all-groups \
38+
--all-extras \
39+
--format=pylock.toml \
40+
--output-file=pylock.toml \
41+
--quiet

0 commit comments

Comments
 (0)