Advertisement
Guest User

Untitled

a guest
May 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #
  2. # Script to run lerna on all modified packages
  3. # author: Ivo Tripunovic
  4. # date: 7. May 2019.
  5. #
  6. modified=$(git status --porcelain | egrep 'packages/[a-z-]*/' -o | sort | uniq | sed -e 's/\// /g' -e 's/packages/ /')
  7. pkgs=""
  8. while read -r line; do
  9. if [[ $line =~ $pattern ]]; then
  10. pkgs="$pkgs --scope $line"
  11. fi
  12. done <<< "$modified"
  13.  
  14. time lerna run build $pkgs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement