Skip to content

Commit

Permalink
chore: change relative path for Make context
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
  • Loading branch information
spiffcs committed Jun 24, 2024
1 parent bc181e9 commit ac55fb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/update-quality-gate-db.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Run your command and capture the output
output=$(go run ../../cmd/grype/main.go db list)
output=$(go run ./cmd/grype/main.go db list)

# Extract the first instance of URL using grep, cut, and sed to trim leading whitespace
url=$(echo "$output" | grep -m 1 -o 'URL: .*' | cut -d' ' -f2- | sed 's/^[[:space:]]*//')
Expand All @@ -10,4 +10,4 @@ url=$(echo "$output" | grep -m 1 -o 'URL: .*' | cut -d' ' -f2- | sed 's/^[[:spac
escaped_url=$(printf '%s\n' "$url" | sed -e 's/[\/&]/\\&/g')

# Replace TEST_DB_URL in specific Makefile using sed
sed -i '' -e "s|^TEST_DB_URL = .*|TEST_DB_URL = $escaped_url|" ../../test/quality/Makefile
sed -i '' -e "s|^TEST_DB_URL = .*|TEST_DB_URL = $escaped_url|" ./test/quality/Makefile

0 comments on commit ac55fb3

Please sign in to comment.