Verified Commit ab5c9c6a authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add option to build with wp-cli nightly

parent 709f96e6
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ COPY scripts/wp.sh /usr/local/bin/wp
COPY data/composer.json /app/composer.json

ARG wp_version=latest
ARG wp_cli_nightly
ENV WP_CLI_NIGHTLY=$wp_cli_nightly
RUN --mount=type=bind,source=scripts/install-wp.sh,target=/install-wp \
    /install-wp ${wp_version}

+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,11 @@ ln -s ../lib/composer.phar /usr/local/bin/composer
curl -sSL ${WP_CLI_URL} \
    >/usr/local/lib/wp-cli.phar

# Upgrade to nightly wp-cli if requested, their release cycle is borked
if [[ -n ${WP_CLI_NIGHTLY-} ]]; then
	wp cli update --nightly --yes
fi

# Install Wordpress core
wp core download --skip-content --locale=en_GB --version=$1

+2 −1
Original line number Diff line number Diff line
#  Copyright 2021-2023  Dominik Sekotill <dom.sekotill@kodo.org.uk>
#  Copyright 2021-2023, 2026  Dominik Sekotill <dom.sekotill@kodo.org.uk>
#
#  This Source Code Form is subject to the terms of the Mozilla Public
#  License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -46,6 +46,7 @@ class Wordpress(Container):
			self,
			Image.build(
				BUILD_CONTEXT,
				wp_cli_nightly=environ.get("WP_CLI_NIGHTLY"),
				php_version=environ.get("PHP_VERSION"),
				wp_version=environ.get("WP_VERSION"),
			),