Skip to content

Commit

Permalink
Better Erigon v3 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Oct 3, 2024
1 parent dedfef9 commit 366f2e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,11 @@ __delete_erigon() {
# Check Erigon version, only continue if v3
__var="ERIGON_DOCKER_TAG"
__value=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true)
__var="ERIGON_DOCKER_REPO"
__repo=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true)
# I do mean to match literally
# shellcheck disable=SC2076
if [[ ! ("${__value}" =~ "v3" || "${__value}" = "latest" || "${__value}" = "main-latest") ]]; then
if [[ ! ("${__value}" =~ "v3" || ( "${__value}" = "latest" && "${__repo}" =~ "thorax" ) || "${__value}" = "main-latest") ]]; then
return 0
fi

Expand Down

0 comments on commit 366f2e5

Please sign in to comment.