fornellas / resonance

A transactional host configuration management tool.
GNU General Public License v3.0
4 stars 1 forks source link

Automatically update protoc version #123

Open fornellas opened 3 weeks ago

fornellas commented 3 weeks ago

https://github.com/fornellas/resonance/pull/75/files#r1739236678

ricardo6142dh commented 1 week ago

We need to figure out a way to keep this updated. My suggestion here, is to:

Save this version on a .protoc_version file, and populate this variable from the file contents. Add a update-protoc target, that updates the version at .protoc_version, and tie to the new target from Add update-deps make target #117 . To get the latest version, somethnig like this should do:

curl -v https://github.com/protocolbuffers/protobuf/releases/latest/ 2>&1 | grep -Ei '^< location: ' | tr / \n | tail -n 1 but it of course needs some polishing to take care of errors (eg: what if there's a 404, it comes up empty, etc etc?).