Created
          June 5, 2019 10:27 
        
      - 
      
- 
        Save joshuapaling/02b43c99494e1462cd604908ca3b284e to your computer and use it in GitHub Desktop. 
    upgrade packages only if your tests pass
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | declare -a packages=( | |
| "node-sass" | |
| "react-qr-reader" | |
| "moment-timezone" | |
| "qs" | |
| ) | |
| for i in "${packages[@]}" | |
| do | |
| yarn upgrade $i --latest --tilde | |
| yarn install && yarn test | |
| if [ "$?" = 0 ]; then | |
| echo "############## YES UPGRADING $i #############" | |
| git add . | |
| git commit -m "yarn upgrade $i --latest --tilde" | |
| else | |
| echo "############## NOT UPGRADING $i #############" | |
| git reset --hard | |
| fi | |
| done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment