polite-engineer-31217
01/27/2023, 8:06 PMurl="<https://infracost.io/downloads/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 ?crooked-daybreak-55253
01/27/2023, 8:18 PMpolite-engineer-31217
01/27/2023, 8:19 PMRUN 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" \
;; \
esac;\
curl -L "<https://github.com/infracost/infracost/releases/download/v${INFRACOST}/infracost-linux-${ARCH}.tar.gz>" | tar -zx -C /usr/local/bin/
"VERSION=${VERSION:-latest}"
The script will keep download the latest but it will also accept to override this version
VERSION=v0.1.2 curl ...
crooked-daybreak-55253
01/27/2023, 8:26 PMINFRACOST_VERSION
to avoid collisions)polite-engineer-31217
01/27/2023, 8:28 PMINFRACOST_VERSION
LGTMcrooked-daybreak-55253
01/27/2023, 8:29 PMpolite-engineer-31217
01/27/2023, 8:37 PMcrooked-daybreak-55253
01/30/2023, 3:32 PMpolite-engineer-31217
01/30/2023, 3:33 PM