From 613bad1e167eb5b1d3eaa472c84730ab065ec036 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Wed, 11 Sep 2024 12:10:30 -0500 Subject: [PATCH] Add ability to install any version from source --- docker-entrypoint.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index dd54b2f..62b9212 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -8,6 +8,20 @@ fi cd /chia-blockchain || exit 1 +# Install alternate version of chia if source mode is requested +# Enables testing dev versions of chia-docker in the container even if the version is not published to the container registry +if [[ -n ${source_ref} ]]; then + echo "Installing chia from source for ref: ${source_ref}" + + DEBIAN_FRONTEND=noninteractive apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y lsb-release sudo git + + rm -rf .penv .venv venv .mypy_cache + git fetch origin "${source_ref}" + git checkout "${source_ref}" + /bin/sh ./install.sh -s +fi + # shellcheck disable=SC1091 . ./activate