This gist includes two files, Makefile and the script.
Script downloads the protoc for a given os and arch, unzips the files to .bin
directory.
It won't download the zip file, if it was already downloaded.
Makefile provides gen-prot
entry point that ensures that protoc exists and generates the code from given proto files.
This setup ensures that the protoc and plugins versions are pinned and there is no need to donwload those tools manually.