Skip to content

Commit c045414

Browse files
committed
Change update.sh to munge "4.0" into "4.0.0" so we keep the "4.0.0" tag when "4.0.1" comes around
1 parent 6b0c230 commit c045414

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RUN rm -rf /var/www/html && mkdir /var/www/html
3636
VOLUME /var/www/html
3737
WORKDIR /var/www/html
3838

39-
ENV WORDPRESS_VERSION 4.0
39+
ENV WORDPRESS_VERSION 4.0.0
4040

4141
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
4242
RUN curl -SL http://wordpress.org/wordpress-$WORDPRESS_VERSION.tar.gz | tar -xzC /usr/src/

update.sh

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

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

6-
sed -ri 's/^(ENV WORDPRESS_VERSION ).*/\1'"$current"'/' Dockerfile
6+
if [[ "$current" != *.*.* ]]; then
7+
# turn "4.0" into "4.0.0"
8+
current+='.0'
9+
fi
10+
11+
set -x
12+
sed -ri 's/^(ENV WORDPRESS_VERSION) .*/\1 '"$current"'/' Dockerfile

0 commit comments

Comments
 (0)