Advertisement
Guest User

Untitled

a guest
Jan 14th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. # Get a list of services which have changed against master
  2. #changed=()
  3.  
  4. # Find all the .json files which have been directly updated
  5. changed=$(git diff --stat origin/master | grep "builds/.*\.json" | awk '{print $1}' | sed 's/builds\///g;s/\.json//g')
  6.  
  7. # Find all the playbook yml files which have been directly updated
  8. changed+=$(git diff --stat origin/master | grep "playbooks" | awk '{print $1}' | sed 's/playbooks\///;s/-playbook.yml//')
  9.  
  10. #echo ${changed[@]}
  11. for i in "${changed[@]}"; do echo "$i" ; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement