mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-11-27 11:53:40 +01:00
Add specify WP_VERSION in arguments
This commit is contained in:
parent
b8646bd85f
commit
6e78e79fa7
|
@ -1,8 +1,15 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
WP_VERSION="${1:-}"
|
||||||
|
|
||||||
|
if [ -z "${WP_VERSION}" ]; then
|
||||||
|
echo "> Error: WP_VERSION is not specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "> Building helper image..."
|
echo "> Building helper image..."
|
||||||
docker build -t local/wp-patch-util .
|
docker build --build-arg "WP_VERSION=${WP_VERSION}" -t local/wp-patch-util .
|
||||||
mkdir wp-src/ -p
|
mkdir wp-src/ -p
|
||||||
echo ""
|
echo ""
|
||||||
echo "> Running helper container..."
|
echo "> Running helper container..."
|
||||||
|
|
|
@ -8,6 +8,7 @@ WORKDIR "/wp"
|
||||||
ENV UID 1000
|
ENV UID 1000
|
||||||
ENV GID 1000
|
ENV GID 1000
|
||||||
ENV WP_LOCALE "en_US"
|
ENV WP_LOCALE "en_US"
|
||||||
ENV WP_VERSION "5.8.0"
|
ARG WP_VERSION "5.8.0"
|
||||||
|
ENV WP_VERSION "${WP_VERSION}"
|
||||||
|
|
||||||
ENTRYPOINT ["/wp/entrypoint.sh"]
|
ENTRYPOINT ["/wp/entrypoint.sh"]
|
||||||
|
|
|
@ -4,6 +4,7 @@ echo "> Downloading WordPress ${WP_VERSION} ..."
|
||||||
|
|
||||||
# Removes trailing zero if found
|
# Removes trailing zero if found
|
||||||
WP_SHORT_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0//g');
|
WP_SHORT_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0//g');
|
||||||
|
echo "> Short Version: ${WP_SHORT_VERSION}"
|
||||||
|
|
||||||
wp --allow-root --path="/tmp" core download --locale="${WP_LOCALE}" --version="${WP_SHORT_VERSION}"
|
wp --allow-root --path="/tmp" core download --locale="${WP_LOCALE}" --version="${WP_SHORT_VERSION}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user