Skip to content

Commit

Permalink
Fix issue with build-farmOS.sh tagged releases.
Browse files Browse the repository at this point in the history
Previously ${FARMOS_COMPOSER_VERSION} was not being set for
tagged releases, causing `composer require farmos/farmos`
to run without a version constraint. This worked for 2.x
releases because it would default to the latest stable release.

This does not work for 3.0.0-betaX releases, because they are
not considered "stable" by Composer, so it falls back on the
latest stable 2.x release (2.2.2).
  • Loading branch information
mstenta committed Nov 3, 2023
1 parent 8d90aec commit a74ec6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/build-farmOS.sh
Expand Up @@ -35,6 +35,8 @@ if [ "${FARMOS_VERSION}" = "3.x" ]; then
FARMOS_COMPOSER_VERSION="3.x-dev"
elif [[ ! "${FARMOS_VERSION}" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
FARMOS_COMPOSER_VERSION="dev-${FARMOS_VERSION}"
else
FARMOS_COMPOSER_VERSION="${FARMOS_VERSION}"
fi
composer require farmos/farmos ${FARMOS_COMPOSER_VERSION} --no-install

Expand Down

0 comments on commit a74ec6a

Please sign in to comment.