mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
CI: Fix validate-npm-packages regex to work without version suffix (#76838)
Fix validate-npm-packages regex to work without suffix
This commit is contained in:
parent
6cb5e0806e
commit
d29af5ec08
@ -8,7 +8,7 @@ ARTIFACTS_DIR="./npm-artifacts"
|
||||
for file in "$ARTIFACTS_DIR"/*.tgz; do
|
||||
echo "🔍 Checking NPM package: $file"
|
||||
# get filename then strip everything after package name.
|
||||
dir_name=$(basename "$file" .tgz | sed 's/^@\(.*\)-[0-9]*[.]*[0-9]*[.]*[0-9]*-\([0-9]*[a-zA-Z]*\)/\1/')
|
||||
dir_name=$(basename "$file" .tgz | sed -E 's/@([a-zA-Z0-9-]+)-[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9-]+)?/\1/')
|
||||
mkdir -p "./npm-artifacts/$dir_name"
|
||||
tar -xzf "$file" -C "./npm-artifacts/$dir_name" --strip-components=1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user