ruimarinho / docker-bitcoin-core

A bitcoin-core docker image
https://hub.docker.com/r/ruimarinho/bitcoin-core/
MIT License
367 stars 213 forks source link

Fix pushing wrong versions to new tags #104

Closed AlonzoRicardo closed 3 years ago

AlonzoRicardo commented 3 years ago

Problem

New tags which evaluate to be less than the targeted folder version will not trigger the exit 0.

Example

When TAG_MAJOR_MINOR is 0.11.x and BITCOIN_VERSION is greater than 0.11

# Will not trigger exit 0
if [ $(version ${TAG_MAJOR_MINOR}) -gt $(version ${BITCOIN_VERSION}) ]; then
  echo "Skipping build of base image $BITCOIN_VERSION/ as ${TAG} is targeted at ${TAG_MAJOR_MINOR}/"
  exit 0
fi

Behaviour

All jobs for folder versions which are greater than the tag version will not skip and will instead race to update the new tag in dockerhub.