-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): ADding list of packages in the release assets
- Loading branch information
Showing
2 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 | ||
|
||
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); | ||
|
||
# Output the list of public packages and save it to a file in the root | ||
output_file="$(dirname "$root_dir")/ECL-npm-packages" | ||
echo "Public packages:" > "$output_file" | ||
for package in $public_packages; do | ||
echo "$package@$lerna_version" >> "$output_file" | ||
done | ||
|
||
echo "List of public packages saved to $output_file" |