Skip to content

Commit

Permalink
ci(repo): fix packages path
Browse files Browse the repository at this point in the history
fix #420

Signed-off-by: Antonette Caldwell <[email protected]>
  • Loading branch information
nebula-aac committed Dec 12, 2023
1 parent b32a231 commit 2e10aed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/version-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ if [ -n "$CHANGED_PACKAGES" ]; then

# Stage changes to package.json files
for PACKAGE_NAME in $CHANGED_PACKAGES; do
PACKAGE_PATH="packages/$(echo $PACKAGE_NAME | tr -d '@' | sed 's/\//-/')"
grep -q "\"name\": \"$PACKAGE_NAME\"" "$PACKAGE_PATH/package.json" && git add "$PACKAGE_PATH/package.json"
# Adjusting the package path based on the correct structure
PACKAGE_PATH="packages/$PACKAGE_NAME"

# Check if the package directory exists before attempting to grep
if [ -d "$PACKAGE_PATH" ]; then
grep -q "\"name\": \"$PACKAGE_NAME\"" "$PACKAGE_PATH/package.json" && git add "$PACKAGE_PATH/package.json"
else
echo "Package directory $PACKAGE_PATH does not exist."
fi
done
else
echo "No changed packages detected. Skipping lerna version."
Expand Down

0 comments on commit 2e10aed

Please sign in to comment.