Is there an elegant way to calculate known_version...
# general
f
Is there an elegant way to calculate known_versions for e.g. nodejs? Do I really have to download the right archive format (xz vs gz?) from the right URL and run sha256sum and wc on it for all platforms?
c
yea.. we don't have a nice tool for this.. but you can do it in a oneliner (per platform)
Copy code
curl -L $URL | tee >(wc -c) >(shasum -a 256) >/dev/null
f
I wrote a little Python script with no dependencies that directly outputs the content to paste into pants.toml. Works for nodejs, but can easily adapted for
pex-cli
or others.
👍 2