Hi there, looking at the install script it looks l...
# help
Hi there, looking at the install script it looks like we can’t install any version from it. I would expect this script https://raw.githubusercontent.com/infracost/infracost/v0.10.16/scripts/install.sh to install v0.10.16 instead of latest
I know there are some docker images prebuilt where I could directly get the correct binary depending of the arch but downloading the tar would avoid downloading a full image. Any thoughts ?
Hi, yeah I guess that is a bit confusing because we don’t modify the install script with the version so it’s always pointed to the latest. The binaries for each release are available as release assets so if you look at the release page for 0.10.16 in the assests section you’ll see the binaries for each arch/platform, e.g. https://github.com/infracost/infracost/releases/download/v0.10.16/infracost-linux-amd64.tar.gz
We also have some redirect links set up so you can point to v0.10.*, let me find those
Yes, that’s what I did before the multi arch, but the installer is very convenient to avoid this kind of logic in Dockerfile
Copy code
RUN set -eux; \
    case "${TARGETPLATFORM}" in \
      linux/amd64)  \
        AWSCLI='awscli-exe-linux-x86_64.zip'  \
        ARCH="amd64"  \
      ;; \
      linux/arm64|linux/arm/v8)  \
        AWSCLI='awscli-exe-linux-aarch64.zip'  \
        ARCH="arm64"  \
      ;; \
curl -L "<https://github.com/infracost/infracost/releases/download/v${INFRACOST}/infracost-linux-${ARCH}.tar.gz>" | tar -zx -C /usr/local/bin/
What do you think about simply adding a
The script will keep download the latest but it will also accept to override this version
VERSION=v0.1.2 curl ...
yeah that makes sense if we let you provide the version as an env or a flag. (probably would want to call the env
to avoid collisions)
not sure you can pass a flag when you pipe the download to sh ?
do you want me to make a PR for that ?
yeah that would be great
you can sign me up for the review (@tim775) whenever it’s ready
I’m not allowed to add reviewers but here is the PR https://github.com/infracost/infracost/pull/2251
This is merged to master if you want to try it out
I got the notification, thank you