Skip to content

Commit

Permalink
chore(ci): Small tweaks - FRONT-4054
Browse files Browse the repository at this point in the history
  • Loading branch information
planctus committed Aug 14, 2023
1 parent bb417ee commit 2454f11
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/packagesList.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/bash

# Find all package.json files in the root directory and its subdirectories,
# excluding node_modules and only searching in @ecl/ directories
# Go to project root
cd "$(dirname "$0")"
cd ..

public_packages=$(find $(dirname "$root_dir") -type f -name "package.json" -not -path "*/node_modules/*" -exec grep -L '"private": true' {} + | xargs -I {} grep -o '"name": "[^"]*' {} | cut -d'"' -f4)
lerna_version=$(grep -o '"version": "[^"]*' "$(dirname "$root_dir")/lerna.json" | cut -d'"' -f4);
# Find all package.json files in the root directory and its subdirectories.
public_packages=$(find . -type f -name "package.json" -not -path "*/node_modules/*" -exec grep -L '"private": true' {} + | xargs -I {} grep -o '"name": "[^"]*' {} | cut -d'"' -f4)
# Get the version
lerna_version=$(grep -o '"version": "[^"]*' "lerna.json" | cut -d'"' -f4);

# Output the list of public packages and save it to a file in the root
output_file="$(dirname "$root_dir")/ECL-npm-packages"
output_file="ECL-npm-packages"
echo "Public packages:" > "$output_file"
for package in $public_packages; do
echo "$package@$lerna_version" >> "$output_file"
Expand Down

0 comments on commit 2454f11

Please sign in to comment.