Skip to content

Commit b69836c

Browse files
authored
Merge pull request #71 from skyred/patch-25
Add 8.3.x branch, and use PHP 7.1 for the new branch.
2 parents 1ad01e8 + a5a6b12 commit b69836c

File tree

5 files changed

+87
-6
lines changed

5 files changed

+87
-6
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ language: bash
22
services: docker
33

44
env:
5+
- VERSION=8.3-rc VARIANT=apache
6+
- VERSION=8.3-rc VARIANT=fpm
57
- VERSION=8.2 VARIANT=apache
68
- VERSION=8.2 VARIANT=fpm
79
- VERSION=7 VARIANT=apache

8.3-rc/apache/Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# from https://www.drupal.org/requirements/php#drupalversions
2+
FROM php:7.1-apache
3+
4+
RUN a2enmod rewrite
5+
6+
# install the PHP extensions we need
7+
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
8+
&& rm -rf /var/lib/apt/lists/* \
9+
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
10+
&& docker-php-ext-install gd mbstring opcache pdo pdo_mysql pdo_pgsql zip
11+
12+
# set recommended PHP.ini settings
13+
# see https://secure.php.net/manual/en/opcache.installation.php
14+
RUN { \
15+
echo 'opcache.memory_consumption=128'; \
16+
echo 'opcache.interned_strings_buffer=8'; \
17+
echo 'opcache.max_accelerated_files=4000'; \
18+
echo 'opcache.revalidate_freq=60'; \
19+
echo 'opcache.fast_shutdown=1'; \
20+
echo 'opcache.enable_cli=1'; \
21+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
22+
23+
WORKDIR /var/www/html
24+
25+
# https://www.drupal.org/node/3060/release
26+
ENV DRUPAL_VERSION 8.3.0-alpha1
27+
ENV DRUPAL_MD5 601f931d5a3281214917e3eabfd86408
28+
29+
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
30+
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
31+
&& tar -xz --strip-components=1 -f drupal.tar.gz \
32+
&& rm drupal.tar.gz \
33+
&& chown -R www-data:www-data sites modules themes

8.3-rc/fpm/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# from https://www.drupal.org/requirements/php#drupalversions
2+
FROM php:7.1-fpm
3+
4+
# install the PHP extensions we need
5+
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
6+
&& rm -rf /var/lib/apt/lists/* \
7+
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
8+
&& docker-php-ext-install gd mbstring opcache pdo pdo_mysql pdo_pgsql zip
9+
10+
# set recommended PHP.ini settings
11+
# see https://secure.php.net/manual/en/opcache.installation.php
12+
RUN { \
13+
echo 'opcache.memory_consumption=128'; \
14+
echo 'opcache.interned_strings_buffer=8'; \
15+
echo 'opcache.max_accelerated_files=4000'; \
16+
echo 'opcache.revalidate_freq=60'; \
17+
echo 'opcache.fast_shutdown=1'; \
18+
echo 'opcache.enable_cli=1'; \
19+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
20+
21+
WORKDIR /var/www/html
22+
23+
# https://www.drupal.org/node/3060/release
24+
ENV DRUPAL_VERSION 8.3.0-alpha1
25+
ENV DRUPAL_MD5 601f931d5a3281214917e3eabfd86408
26+
27+
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
28+
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
29+
&& tar -xz --strip-components=1 -f drupal.tar.gz \
30+
&& rm drupal.tar.gz \
31+
&& chown -R www-data:www-data sites modules themes

generate-stackbrew-library.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -eu
33

44
declare -A aliases=(
55
[8.2]='8 latest'
6+
[8.3-rc]='rc'
67
)
78

89
self="$(basename "$BASH_SOURCE")"
@@ -52,15 +53,16 @@ join() {
5253
}
5354

5455
for version in "${versions[@]}"; do
56+
rcVersion="${version%-rc}"
5557
for variant in apache fpm; do
5658
commit="$(dirCommit "$version/$variant")"
5759

5860
fullVersion="$(git show "$commit":"$version/$variant/Dockerfile" | awk '$1 == "ENV" && $2 == "DRUPAL_VERSION" { print $3; exit }')"
5961

6062
versionAliases=()
61-
while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do
63+
while [ "$fullVersion" != "$rcVersion" -a "${fullVersion%[.]*}" != "$fullVersion" ]; do
6264
versionAliases+=( $fullVersion )
63-
fullVersion="${fullVersion%[.-]*}"
65+
fullVersion="${fullVersion%[.]*}"
6466
done
6567
versionAliases+=(
6668
$version

update.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@ if [ ${#versions[@]} -eq 0 ]; then
99
fi
1010
versions=( "${versions[@]%/}" )
1111

12-
curl -fSL 'https://www.drupal.org/node/3060/release' -o release
12+
curl -fsSL 'https://www.drupal.org/node/3060/release' -o release
13+
trap 'rm -f release' EXIT
1314

1415
travisEnv=
1516
for version in "${versions[@]}"; do
16-
fullVersion="$(grep -E '>drupal-'"$version"'\.[0-9a-z.-]+\.tar\.gz<' release | sed -r 's!.*<a[^>]+>drupal-([^<]+)\.tar\.gz</a>.*!\1!' | head -1)"
17+
rcGrepV='-v'
18+
rcVersion="${version%-rc}"
19+
if [ "$rcVersion" != "$version" ]; then
20+
rcGrepV=
21+
fi
22+
fullVersion="$(
23+
grep -E '>drupal-'"$rcVersion"'\.[0-9a-z.-]+\.tar\.gz<' release \
24+
| sed -r 's!.*<a[^>]+>drupal-([^<]+)\.tar\.gz</a>.*!\1!' \
25+
| grep $rcGrepV -E -- '-rc|-beta|-alpha|-dev' \
26+
| head -1
27+
)"
28+
if [ -z "$fullVersion" ]; then
29+
echo >&2 "error: cannot find release for $version"
30+
exit 1
31+
fi
1732
md5="$(grep -A6 -m1 '>drupal-'"$fullVersion"'.tar.gz<' release | grep -A1 -m1 '"md5 hash"' | tail -1 | awk '{ print $1 }')"
1833

1934
(
@@ -31,5 +46,3 @@ done
3146

3247
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
3348
echo "$travis" > .travis.yml
34-
35-
rm -f release

0 commit comments

Comments
 (0)