pantsbuild / setup

Scripts for setting up Pants in your repo
Apache License 2.0
13 stars 30 forks source link

Update shim for new VERSION location #135

Closed thejcannon closed 1 year ago

thejcannon commented 1 year ago

See https://github.com/pantsbuild/pants/pull/17563 for the pants repo change.

chrisjrn commented 1 year ago

It looks like you can use the GitHub compare commits endpoint without authentication:

% curl \
  -H "Accept: application/vnd.github+json" \
  https://api.github.com/repos/pantsbuild/pants/compare/169d2e613cad7b1bd2593ae9e747100458bf2e5f...66edd8917f5c57b8ab0e36c88dc556142b321732 | grep \"status\"
  "status": "behind",

That status field will give either ahead, behind, or identical. So you can check to see if the requested SHA is behind the changeover commit, and in that case, use the old URL version.

thejcannon commented 1 year ago

Going to drop in favor of a symlink