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.

40 lines
993 B

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