-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c84df6
commit 46beebc
Showing
3 changed files
with
43 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.github | ||
node_modules | ||
coverage | ||
deploy | ||
|
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,32 @@ | ||
#!/bin/bash | ||
|
||
# Mapping of paths to package names | ||
declare -A packages | ||
packages["./packages/common"]="@subql/common" | ||
packages["./packages/common-substrate"]="@subql/common-substrate" | ||
packages["./packages/node-core"]="@subql/node-core" | ||
packages["./packages/types-core"]="@subql/types-core" | ||
packages["./packages/types"]="@subql/types" | ||
packages["./packages/utils"]="@subql/utils" | ||
packages["./packages/testing"]="@subql/testing" | ||
|
||
# Path to the node package.json | ||
node_package_json="./packages/node/package.json" | ||
|
||
# Iterate over each package | ||
for package in ${!packages[@]} | ||
do | ||
# Get the version of the current package | ||
version=$(jq -r '.version' $package/package.json) | ||
|
||
# Check if the node package.json file exists | ||
if [[ -f $node_package_json ]]; then | ||
# Replace workspace:* with the actual version in package.json of node, without including the trailing comma | ||
sed -i.bak "s#\"${packages[$package]}\": \"workspace:\*\"#\"${packages[$package]}\": \"$version\"#" $node_package_json | ||
# Remove the backup file | ||
rm "${node_package_json}.bak" | ||
else | ||
echo "Error: $node_package_json does not exist." | ||
exit 1 | ||
fi | ||
done |
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