Files
welshman/build_and_link.sh
T
2025-04-01 10:50:43 -07:00

24 lines
577 B
Bash
Executable File

#!/bin/bash
upstream=$1
npm run fix -w @welshman/$upstream
npm run build -w @welshman/$upstream
if [[ $? -eq 1 ]]; then
exit 1
fi
for downstream in $(./get_packages.py); do
n=@welshman/$upstream
f=packages/$downstream/package.json
v=$(jq '.dependencies["'$n'"] // empty' $f)
if [[ ! -z $v ]]; then
rm -rf packages/$downstream/node_modules/@welshman/$upstream
cp -r packages/$upstream packages/$downstream/node_modules/@welshman/$upstream
rm -rf node_modules/@welshman/$upstream
cp -r packages/$upstream node_modules/@welshman/$upstream
fi
done