cronos Dockerfile: support -testnet version suffix (release tag = base version, asset keeps suffix) - testnet builds use tcrc bech32 prefixes; mainnet binary crashes on testnet validator addresses

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
rob
2026-07-10 17:57:54 +00:00
parent 3b46f53a4d
commit f04d2f9440

View File

@@ -7,8 +7,12 @@ FROM alpine:3.21
RUN apk add --no-cache ca-certificates curl jq
ARG CRONOS_CRONOS_VERSION
# Version may carry a "-testnet" suffix (e.g. v1.7.8-testnet): the release TAG is the
# base version, the ASSET keeps the suffix (testnet builds use tcrc bech32 prefixes -
# a mainnet binary cannot parse testnet validator addresses).
RUN _ver="${CRONOS_CRONOS_VERSION#v}" && \
curl -fsSL "https://github.com/crypto-org-chain/cronos/releases/download/${CRONOS_CRONOS_VERSION}/cronos_${_ver}_Linux_x86_64.tar.gz" \
_tag="v${_ver%-testnet}" && \
curl -fsSL "https://github.com/crypto-org-chain/cronos/releases/download/${_tag}/cronos_${_ver}_Linux_x86_64.tar.gz" \
-o /tmp/cronos.tar.gz && \
tar -xzf /tmp/cronos.tar.gz -C /tmp && \
install -m 755 /tmp/bin/cronosd /usr/local/bin/cronosd && \