mirror of
https://github.com/joomla-docker/docker-joomla.git
synced 2025-01-25 08:08:41 +00:00
Don't need the UPSTREAM_VERSION env var
This commit is contained in:
parent
dd1a637083
commit
8df265f11a
@ -14,7 +14,6 @@ VOLUME /var/www/html
|
||||
|
||||
# Define Joomla version and expected SHA1 signature
|
||||
ENV JOOMLA_VERSION 3.4.3
|
||||
ENV JOOMLA_UPSTREAM_VERSION 3.4.3
|
||||
ENV JOOMLA_SHA1 cd35ed61029d2ed0dc38cc70073944786bba7979
|
||||
|
||||
# Download package and extract to web volume
|
||||
|
@ -11,7 +11,6 @@ VOLUME /var/www/html
|
||||
|
||||
# Define Joomla version and expected SHA1 signature
|
||||
ENV JOOMLA_VERSION 3.4.3
|
||||
ENV JOOMLA_UPSTREAM_VERSION 3.4.3
|
||||
ENV JOOMLA_SHA1 cd35ed61029d2ed0dc38cc70073944786bba7979
|
||||
|
||||
# Download package and extract to web volume
|
||||
|
@ -4,14 +4,8 @@ set -e
|
||||
# TODO - We (Joomla) need to expose an alternate API to checking the latest version other than our XML files
|
||||
current="$(curl -A 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36' -sSL 'http://developer.joomla.org/latest_version.json' | sed -r 's/^.*"current":"([^"]+)".*$/\1/')"
|
||||
|
||||
upstream="$current"
|
||||
if [[ "$current" != *.*.* ]]; then
|
||||
# turn "3.4" into "3.4.0"
|
||||
current+='.0'
|
||||
fi
|
||||
|
||||
# We're putting a lot of trust in this process, once Joomla has an exposed API to query the SHA1 use that instead
|
||||
wget -O joomla.zip https://github.com/joomla/joomla-cms/releases/download/$upstream/Joomla_$upstream-Stable-Full_Package.zip
|
||||
wget -O joomla.zip https://github.com/joomla/joomla-cms/releases/download/$current/Joomla_$current-Stable-Full_Package.zip
|
||||
sha1="$(sha1sum joomla.zip | sed -r 's/ .*//')"
|
||||
|
||||
for variant in apache fpm; do
|
||||
@ -20,7 +14,6 @@ for variant in apache fpm; do
|
||||
|
||||
sed -ri '
|
||||
s/^(ENV JOOMLA_VERSION) .*/\1 '"$current"'/;
|
||||
s/^(ENV JOOMLA_UPSTREAM_VERSION) .*/\1 '"$upstream"'/;
|
||||
s/^(ENV JOOMLA_SHA1) .*/\1 '"$sha1"'/;
|
||||
' "$variant/Dockerfile"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user