Skip to content

Commit

Permalink
Add commands to check the replaced line can be found and was replaced…
Browse files Browse the repository at this point in the history
… + lint the file afterwards

Ref #361
Ref #364
Ref #365
Ref #366
  • Loading branch information
williamdes committed May 12, 2022
1 parent a9851bb commit cddd8dd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
rm -r -v /var/www/html/setup/ /var/www/html/examples/ /var/www/html/js/src/ /var/www/html/templates/test/ /var/www/html/babel.config.json /var/www/html/doc/html/_sources/ /var/www/html/RELEASE-DATE-$VERSION /var/www/html/CONTRIBUTING.md; \
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
php -l /var/www/html/libraries/vendor_config.php; \
apk del --no-network .fetch-deps

# Copy configuration
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
rm -r -v /var/www/html/setup/ /var/www/html/examples/ /var/www/html/js/src/ /var/www/html/templates/test/ /var/www/html/babel.config.json /var/www/html/doc/html/_sources/ /var/www/html/RELEASE-DATE-$VERSION /var/www/html/CONTRIBUTING.md; \
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
php -l /var/www/html/libraries/vendor_config.php; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
Expand Down
3 changes: 3 additions & 0 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
rm -r -v /var/www/html/setup/ /var/www/html/examples/ /var/www/html/js/src/ /var/www/html/templates/test/ /var/www/html/babel.config.json /var/www/html/doc/html/_sources/ /var/www/html/RELEASE-DATE-$VERSION /var/www/html/CONTRIBUTING.md; \
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
php -l /var/www/html/libraries/vendor_config.php; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
Expand Down
3 changes: 3 additions & 0 deletions fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
rm -r -v /var/www/html/setup/ /var/www/html/examples/ /var/www/html/js/src/ /var/www/html/templates/test/ /var/www/html/babel.config.json /var/www/html/doc/html/_sources/ /var/www/html/RELEASE-DATE-$VERSION /var/www/html/CONTRIBUTING.md; \
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
php -l /var/www/html/libraries/vendor_config.php; \
apk del --no-network .fetch-deps

# Copy configuration
Expand Down
3 changes: 3 additions & 0 deletions fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
rm -r -v /var/www/html/setup/ /var/www/html/examples/ /var/www/html/js/src/ /var/www/html/templates/test/ /var/www/html/babel.config.json /var/www/html/doc/html/_sources/ /var/www/html/RELEASE-DATE-$VERSION /var/www/html/CONTRIBUTING.md; \
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
php -l /var/www/html/libraries/vendor_config.php; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
Expand Down

0 comments on commit cddd8dd

Please sign in to comment.