Skip to content
Snippets Groups Projects

feat: improve `update-deps.sh`

Merged Nicola Spanti requested to merge topic/default/update-deps-improve into branch/default
1 file
+ 18
9
Compare changes
  • Side-by-side
  • Inline
+ 18
9
#!/bin/bash
#!/bin/sh
# Updates @cubicweb/ra-cubicweb and demo dependencies for the specified package and version
# Updates @cubicweb/ra-cubicweb and demo dependencies
# for the specified package and version
if [ "$#" -ne 1 ]; then
echo "Please specify a package name"
if [ "$#" -eq 0 ]; then
>&2 echo 'Please specify a package name as argument'
exit 1
fi
if [ "$#" -gt 1 ]; then
>&2 echo 'Please specify only one argument'
exit 1
fi
package=$1
if [ `echo "$package" | wc --chars` -eq 1 ]; then
>&2 echo 'An empty string can not be a package name'
exit 1
fi
echo "Installing ${package}"
echo "Installing "${package}
cd packages/ra-cubicweb && yarn add ${package} -D --exact && yarn add ${package} -P --exact
cd ../demo && yarn add ${package} --exact
\ No newline at end of file
cd packages/ra-cubicweb && yarn add "${package}" -D --exact \
&& yarn add "${package}" -P --exact
cd ../demo && yarn add "${package}" --exact
Loading