2022-02-16 11:41:18 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-10-08 16:44:45 +00:00
|
|
|
# updates all necessary package.json files in this monorepo with the given version for pashto inflector
|
2022-02-16 11:41:18 +00:00
|
|
|
|
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
2022-10-08 16:44:45 +00:00
|
|
|
echo "Script to update the version of @lingdocs/ps-react and @lingdocs/inflect across this monorepo"
|
2022-02-16 11:41:18 +00:00
|
|
|
echo ""
|
|
|
|
echo "usage: ./update-inlector.sh [version]"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
version=$1
|
|
|
|
|
2022-10-08 16:44:45 +00:00
|
|
|
# update all instances of @lingdocs/inflect and @lingdocs/ps-react in various package.json files
|
|
|
|
# in website
|
|
|
|
tmp=$(mktemp)
|
|
|
|
echo $tmp
|
|
|
|
jq --arg version "$version" '.dependencies."@lingdocs/ps-react"=$version' "website/package.json" > "$tmp" && mv "$tmp" "website/package.json"
|
|
|
|
# in functions
|
|
|
|
tmp=$(mktemp)
|
|
|
|
jq --arg version "$version" '.dependencies."@lingdocs/inflect"=$version' "functions/package.json" > "$tmp" && mv "$tmp" "functions/package.json"
|
2022-02-16 11:41:18 +00:00
|
|
|
|
|
|
|
# install to update .lock files
|
|
|
|
cd website &&
|
2022-04-05 07:45:00 +00:00
|
|
|
yarn install --legacy-peer-deps &&
|
2022-02-16 11:41:18 +00:00
|
|
|
cd ../functions &&
|
|
|
|
npm install
|
|
|
|
|