Skip to content

Commit

Permalink
Smarter main handling for pin
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Jan 3, 2024
1 parent 12441d1 commit 2807447
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ update() {
value=$(sed -n -e "s/^${var}=\(.*\)/\1/p" "${ENV_FILE}" || true)
if [ -z "${value}" ] || [ "${value}" = "latest" ]; then
export ETHDPINNED=""
${__as_owner} git checkout main
__branch=$(git rev-parse --abbrev-ref HEAD)
if [[ "${__branch}" =~ ^tag-v[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
git checkout main
fi
${__as_owner} git pull
else
export ETHDPINNED="${value}"
Expand Down

0 comments on commit 2807447

Please sign in to comment.