@@ -5,14 +5,23 @@ version=$(node -p -e "require('./package.json').version")
55
66if [[ " $OSTYPE " == " darwin" * ]]; then
77 # macOS
8- find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | xargs sed -i ' ' " s/\" @hashgraph\/asset-tokenization-sdk\" : \" .*\" /\" @hashgraph\/asset-tokenization-sdk\" : \" $version \" /g"
9- find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | xargs sed -i ' ' " s/\" @hashgraph\/asset-tokenization-contracts\" : \" .*\" /\" @hashgraph\/asset-tokenization-contracts\" : \" $version \" /g"
8+ find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | while read file; do
9+ echo " Updating $file with version $version "
10+ sed -i ' ' " s/\" @hashgraph\/asset-tokenization-sdk\" : \" .*\" /\" @hashgraph\/asset-tokenization-sdk\" : \" $version \" /g" " $file "
11+ sed -i ' ' " s/\" @hashgraph\/asset-tokenization-contracts\" : \" .*\" /\" @hashgraph\/asset-tokenization-contracts\" : \" $version \" /g" " $file "
12+ done
1013elif [[ " $OSTYPE " == " linux-gnu" * ]]; then
1114 # Linux
12- find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | xargs sed -i " s/\" @hashgraph\/asset-tokenization-sdk\" : \" .*\" /\" @hashgraph\/asset-tokenization-sdk\" : \" $version \" /g"
13- find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | xargs sed -i " s/\" @hashgraph\/asset-tokenization-contracts\" : \" .*\" /\" @hashgraph\/asset-tokenization-contracts\" : \" $version \" /g"
15+ find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | while read file; do
16+ echo " Updating $file with version $version "
17+ sed -i " s/\" @hashgraph\/asset-tokenization-sdk\" : \" .*\" /\" @hashgraph\/asset-tokenization-sdk\" : \" $version \" /g" " $file "
18+ sed -i " s/\" @hashgraph\/asset-tokenization-contracts\" : \" .*\" /\" @hashgraph\/asset-tokenization-contracts\" : \" $version \" /g" " $file "
19+ done
1420elif [[ " $OSTYPE " == " msys" ]]; then
1521 # Windows
16- find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | xargs sed -i " s/\" @hashgraph\/asset-tokenization-sdk\" : \" .*\" /\" @hashgraph\/asset-tokenization-sdk\" : \" $version \" /g"
17- find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | xargs sed -i " s/\" @hashgraph\/asset-tokenization-contracts\" : \" .*\" /\" @hashgraph\/asset-tokenization-contracts\" : \" $version \" /g"
18- fi
22+ find . -path ./node_modules -prune -o -name " package.json" -type f | grep -v node_modules | grep -v example | while read file; do
23+ echo " Updating $file with version $version "
24+ sed -i " s/\" @hashgraph\/asset-tokenization-sdk\" : \" .*\" /\" @hashgraph\/asset-tokenization-sdk\" : \" $version \" /g" " $file "
25+ sed -i " s/\" @hashgraph\/asset-tokenization-contracts\" : \" .*\" /\" @hashgraph\/asset-tokenization-contracts\" : \" $version \" /g" " $file "
26+ done
27+ fi
0 commit comments