mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-08 09:47:11 +08:00
Fix dockerfilegraph pre-commit hook (#17698)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
parent
6eae34533a
commit
05e1f96419
@ -125,8 +125,6 @@ repos:
|
|||||||
name: Update Dockerfile dependency graph
|
name: Update Dockerfile dependency graph
|
||||||
entry: tools/update-dockerfile-graph.sh
|
entry: tools/update-dockerfile-graph.sh
|
||||||
language: script
|
language: script
|
||||||
files: ^docker/Dockerfile$
|
|
||||||
pass_filenames: false
|
|
||||||
# Keep `suggestion` last
|
# Keep `suggestion` last
|
||||||
- id: suggestion
|
- id: suggestion
|
||||||
name: Suggestion
|
name: Suggestion
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 119 KiB |
@ -4,8 +4,11 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Check if docker/Dockerfile is staged for commit
|
# Accept file paths as arguments
|
||||||
if git diff --cached --name-only | grep -q "^docker/Dockerfile$"; then
|
FILES=("$@")
|
||||||
|
|
||||||
|
# Check if docker/Dockerfile is among the provided files
|
||||||
|
if printf '%s\n' "${FILES[@]}" | grep -q "^docker/Dockerfile$"; then
|
||||||
echo "docker/Dockerfile has changed, attempting to update dependency graph..."
|
echo "docker/Dockerfile has changed, attempting to update dependency graph..."
|
||||||
|
|
||||||
# Check if Docker is installed and running
|
# Check if Docker is installed and running
|
||||||
@ -75,4 +78,4 @@ if git diff --cached --name-only | grep -q "^docker/Dockerfile$"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user