You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

8 years ago
  1. #! /bin/bash
  2. # for every github.com/tendermint dependency, warn is if its not synced with origin/master
  3. if [[ "$GLIDE" == "" ]]; then
  4. GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock
  5. fi
  6. # make list of libs
  7. LIBS=($(grep "github.com/tendermint" $GLIDE | awk '{print $3}'))
  8. UPTODATE=true
  9. for lib in "${LIBS[@]}"; do
  10. # get vendored commit
  11. VENDORED=`grep -A1 $lib $GLIDE | grep -v $lib | awk '{print $2}'`
  12. PWD=`pwd`
  13. cd $GOPATH/src/$lib
  14. MASTER=`git rev-parse origin/master`
  15. HEAD=`git rev-parse HEAD`
  16. cd $PWD
  17. if [[ "$VENDORED" != "$MASTER" ]]; then
  18. UPTODATE=false
  19. echo ""
  20. if [[ "$VENDORED" != "$HEAD" ]]; then
  21. echo "Vendored version of $lib differs from origin/master and HEAD"
  22. echo "Vendored: $VENDORED"
  23. echo "Master: $MASTER"
  24. echo "Head: $HEAD"
  25. else
  26. echo "Vendored version of $lib differs from origin/master but matches HEAD"
  27. echo "Vendored: $VENDORED"
  28. echo "Master: $MASTER"
  29. fi
  30. elif [[ "$VENDORED" != "$HEAD" ]]; then
  31. echo ""
  32. echo "Vendored version of $lib matches origin/master but differs from HEAD"
  33. echo "Vendored: $VENDORED"
  34. echo "Head: $HEAD"
  35. fi
  36. done
  37. if [[ "$UPTODATE" == "true" ]]; then
  38. echo "All vendored versions up to date"
  39. fi