Skip to content

Commit aee0066

Browse files
committed
Update download URL to be correct
1 parent 56396f8 commit aee0066

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ VOLUME /var/www/html
3737
WORKDIR /var/www/html
3838

3939
ENV WORDPRESS_VERSION 4.0.0
40+
ENV WORDPRESS_UPSTREAM_VERSION 4.0
4041

4142
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
42-
RUN curl -SL http://wordpress.org/wordpress-$WORDPRESS_VERSION.tar.gz | tar -xzC /usr/src/
43+
RUN curl -SL http://wordpress.org/wordpress-${WORDPRESS_UPSTREAM_VERSION}.tar.gz | tar -xzC /usr/src/
4344

4445
COPY docker-apache.conf /etc/apache2/sites-available/wordpress
4546
RUN a2dissite 000-default && a2ensite wordpress

update.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ set -e
33

44
current="$(curl -sSL 'http://api.wordpress.org/core/version-check/1.7/' | sed -r 's/^.*"current":"([^"]+)".*$/\1/')"
55

6+
upstream="$current"
67
if [[ "$current" != *.*.* ]]; then
78
# turn "4.0" into "4.0.0"
89
current+='.0'
910
fi
1011

1112
set -x
12-
sed -ri 's/^(ENV WORDPRESS_VERSION) .*/\1 '"$current"'/' Dockerfile
13+
sed -ri '
14+
s/^(ENV WORDPRESS_VERSION) .*/\1 '"$current"'/;
15+
s/^(ENV WORDPRESS_UPSTREAM_VERSION) .*/\1 '"$upstream"'/;
16+
' Dockerfile

0 commit comments

Comments
 (0)