Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Sep 16, 2024
1 parent 9212b94 commit 0ddca2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-package-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ else
fi

# Find all package.json files in subdirectories
find . -name "package.json" | while read -r file; do
find . -name "package.json" -not -path "*/node_modules/*" | while read -r file; do
# Check if the file contains any "@dfinity/" package
if grep -q '"@dfinity/' "$file"; then
# Use sed to replace the version for all @dfinity packages, preserving the caret if present
$SED_CMD -i 's/\("@dfinity\/[^"]*"\s*:\s*"\^*\)[0-9.]*"/\1'"$NEW_VERSION"'"/' "$file"
echo "Updated @dfinity/* versions in $file"
fi
# Update `package-lock.json`
npm install --prefix "$file/.." || exit 1
#npm install --prefix "$file/.." || exit 1
done

echo "Script completed."

0 comments on commit 0ddca2c

Please sign in to comment.