mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
changes to build PHP 8 snapshots from master
This commit is contained in:
parent
98d0681333
commit
571ebb21b3
@ -17,7 +17,8 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y software-properties-common \
|
&& apt-get install -y software-properties-common \
|
||||||
&& LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \
|
&& LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& bash -c "apt-get install -y php$PHP_VERSION-{cli,mysql,json,gd,xsl,bz2,opcache,apcu,tidy,zip,bcmath,mbstring,smbclient,ldap,curl,fpm,pgsql,gmp,memcached}" \
|
&& bash -c "apt-get install -y php$PHP_VERSION-{cli,mysql,gd,xsl,bz2,opcache,apcu,tidy,zip,bcmath,mbstring,smbclient,ldap,curl,fpm,pgsql,gmp,memcached}" \
|
||||||
|
&& bash -c "[[ $PHP_VERSION =~ ^8\..* ]] || apt-get install -y php$PHP_VERSION-json" \
|
||||||
# fpm and php.ini settings
|
# fpm and php.ini settings
|
||||||
&& sed -e 's/^;\?listen \?=.*/listen = 9000/g' \
|
&& sed -e 's/^;\?listen \?=.*/listen = 9000/g' \
|
||||||
-e '/allowed_clients/d' \
|
-e '/allowed_clients/d' \
|
||||||
@ -68,9 +69,10 @@ fi; \
|
|||||||
rm composer-setup.php; \
|
rm composer-setup.php; \
|
||||||
exit $RESULT' \
|
exit $RESULT' \
|
||||||
# build EGroupware
|
# build EGroupware
|
||||||
&& cd /usr/share \
|
|
||||||
&& composer.phar self-update 1.8.6 \
|
&& composer.phar self-update 1.8.6 \
|
||||||
&& composer.phar create-project --prefer-dist --no-scripts --no-dev egroupware/egroupware:$VERSION \
|
&& cd /usr/share \
|
||||||
|
&& [ $PHP_VERSION = "8.0" ] && COMPOSER_EXTRA=--ignore-platform-reqs || true \
|
||||||
|
&& composer.phar create-project $COMPOSER_EXTRA --prefer-dist --no-scripts --no-dev egroupware/egroupware:$VERSION \
|
||||||
&& cd egroupware \
|
&& cd egroupware \
|
||||||
&& npm install \
|
&& npm install \
|
||||||
&& grunt \
|
&& grunt \
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
# To build PHP 8 snapshots out of master: doc/docker/fpm/build.sh 8.0 21.1.<date> master
|
||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
@ -13,18 +14,19 @@ fi
|
|||||||
|
|
||||||
DEFAULT=$(git branch|grep ^*|cut -c3-)
|
DEFAULT=$(git branch|grep ^*|cut -c3-)
|
||||||
TAG=${1:-$DEFAULT}
|
TAG=${1:-$DEFAULT}
|
||||||
VERSION=$TAG
|
VERSION=${2:-$TAG}
|
||||||
BRANCH=$(echo $VERSION|sed 's/\.[0-9]\{8\}$//')
|
BRANCH=$(echo $VERSION|sed 's/\.[0-9]\{8\}$//')
|
||||||
[ $VERSION = $BRANCH ] && VERSION="$BRANCH.x-dev"
|
[ $VERSION = $BRANCH ] && VERSION="dev-$BRANCH"
|
||||||
|
|
||||||
[ $VERSION = "$DEFAULT.x-dev" ] && {
|
[ $VERSION = "dev-$DEFAULT" ] && (
|
||||||
grep self.version composer.json | while read pack version; do composer update $(echo $pack|cut -d'"' -f2); done
|
cd ../../..
|
||||||
|
composer update 'egroupware/*'
|
||||||
git status composer.lock|grep composer.lock && {
|
git status composer.lock|grep composer.lock && {
|
||||||
git stash; git pull --rebase; git stash pop
|
git stash; git pull --rebase; git stash pop
|
||||||
git commit -m 'updating composer.lock with latest commit hashed for egroupware/* packages' composer.lock
|
git commit -m 'updating composer.lock with latest commit hashed for egroupware/* packages' composer.lock
|
||||||
VERSION="$VERSION#$(git push|grep $DEFAULT|cut -c4-10)"
|
VERSION="$VERSION#$(git push|grep $DEFAULT|cut -c4-10)"
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
|
|
||||||
# add PHP_VERSION to TAG, if not the default PHP version
|
# add PHP_VERSION to TAG, if not the default PHP version
|
||||||
[ $PHP_VERSION != $DEFAULT_PHP_VERSION ] && TAG=$TAG-$PHP_VERSION
|
[ $PHP_VERSION != $DEFAULT_PHP_VERSION ] && TAG=$TAG-$PHP_VERSION
|
||||||
@ -39,7 +41,7 @@ docker build --no-cache --build-arg "VERSION=$VERSION" --build-arg "PHP_VERSION=
|
|||||||
# docker tag egroupware/egroupware:$TAG egroupware/egroupware:latest
|
# docker tag egroupware/egroupware:$TAG egroupware/egroupware:latest
|
||||||
# docker push egroupware/egroupware:latest
|
# docker push egroupware/egroupware:latest
|
||||||
#}
|
#}
|
||||||
[ "$BRANCH" != $VERSION -a "${BRANCH}.x-dev" != $VERSION ] && {
|
[ "$BRANCH" != $VERSION -a "dev-${BRANCH}" != $VERSION ] && {
|
||||||
docker tag egroupware/egroupware:$TAG egroupware/egroupware:$BRANCH
|
docker tag egroupware/egroupware:$TAG egroupware/egroupware:$BRANCH
|
||||||
docker push egroupware/egroupware:$BRANCH
|
docker push egroupware/egroupware:$BRANCH
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user