grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

scripts: minor refactor to scripts

Open arvindbr8 opened this issue 1 year ago • 1 comments

Fixing parts of https://github.com/grpc/grpc-go/issues/7400.

Changes:

  • install_protoc.sh
    • rename to install-protoc.sh ( following the rest of the file names under scripts/ )
    • In order to easily find the start of the program, put the main program in a function called main as the bottom-most function.
    • Move all checks from download_binary() to main()
    • Modify top-level comment to talk about usage of the script
    • Remove INSTALL_PATH=${1:+"$1"}
  • regenerate.sh
    • exec and not source install_protoc.sh as the very first thing in the script
    • export GOBIN
    • does not save and restore $PATH anymore
  • vet_common.sh
    • rename to common.sh

This PR does not make functional changes to any scripts -- which will be made in an upcoming PR

RELEASE NOTES: none

arvindbr8 avatar Jul 10 '24 21:07 arvindbr8

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.51%. Comparing base (e54f441) to head (c103912). Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7403      +/-   ##
==========================================
+ Coverage   81.46%   81.51%   +0.05%     
==========================================
  Files         348      348              
  Lines       26752    26752              
==========================================
+ Hits        21793    21807      +14     
+ Misses       3771     3764       -7     
+ Partials     1188     1181       -7     

see 17 files with indirect coverage changes

codecov[bot] avatar Jul 10 '24 22:07 codecov[bot]