Skip to content

Commit

Permalink
Fix ext-network handling
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed May 5, 2024
1 parent 3956fbf commit 57f7187
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
docker-compose.yml
ext-network.yml
ext-network.yml.original
ext-network.yml.bak
.eth/*
!.eth/README.md
!.eth/validator_keys/.empty
Expand Down
16 changes: 14 additions & 2 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ prep_conffiles() {
if [ ! -f "ssv-config/config.yaml" ]; then
${__as_owner} cp ssv-config/config-sample.yaml ssv-config/config.yaml
fi
# Create ext-network.yml if it doesn't exist
if [ ! -f "ext-network.yml" ]; then
${__as_owner} cp ext-network.yml.sample ext-network.yml
fi
}


Expand Down Expand Up @@ -1203,9 +1207,14 @@ update() {
fi

if [ -z "${ETHDSECUNDO-}" ]; then
# Do not track changes to ext-network.yml
set +e
${__as_owner} git update-index --assume-unchanged ext-network.yml
__fix_extnetwork=0
if [ ! -f ext-network.yml.sample ]; then
__fix_extnetwork=1
${__as_owner} git update-index --no-assume-unchanged ext-network.yml
${__as_owner} cp ext-network.yml ext-network.yml.bak
${__as_owner} git restore ext-network.yml
fi
${__as_owner} git config pull.rebase false
var="ETH_DOCKER_TAG"
value=$(sed -n -e "s/^${var}=\(.*\)/\1/p" "${ENV_FILE}" || true)
Expand All @@ -1216,6 +1225,9 @@ update() {
git checkout main
fi
${__as_owner} git pull origin main
if [ "${__fix_extnetwork}" -eq 1 ]; then
${__as_owner} cp ext-network.yml.bak ext-network.yml
fi
else
export ETHDPINNED="${value}"
${__as_owner} git fetch --tags
Expand Down
File renamed without changes.

0 comments on commit 57f7187

Please sign in to comment.