Skip to content

Commit cddd8dd

Browse files
committed
Add commands to check the replaced line can be found and was replaced + lint the file afterwards
Ref #361 Ref #364 Ref #365 Ref #366
1 parent a9851bb commit cddd8dd

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

Dockerfile-alpine.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ RUN set -ex; \
102102
gpgconf --kill all; \
103103
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
104104
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; \
105+
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
105106
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
107+
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
108+
php -l /var/www/html/libraries/vendor_config.php; \
106109
apk del --no-network .fetch-deps
107110

108111
# Copy configuration

Dockerfile-debian.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ RUN set -ex; \
109109
gpgconf --kill all; \
110110
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
111111
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; \
112+
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
112113
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
114+
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
115+
php -l /var/www/html/libraries/vendor_config.php; \
113116
\
114117
apt-mark auto '.*' > /dev/null; \
115118
apt-mark manual $savedAptMark; \

apache/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ RUN set -ex; \
109109
gpgconf --kill all; \
110110
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
111111
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; \
112+
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
112113
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
114+
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
115+
php -l /var/www/html/libraries/vendor_config.php; \
113116
\
114117
apt-mark auto '.*' > /dev/null; \
115118
apt-mark manual $savedAptMark; \

fpm-alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ RUN set -ex; \
102102
gpgconf --kill all; \
103103
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
104104
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; \
105+
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
105106
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
107+
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
108+
php -l /var/www/html/libraries/vendor_config.php; \
106109
apk del --no-network .fetch-deps
107110

108111
# Copy configuration

fpm/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ RUN set -ex; \
109109
gpgconf --kill all; \
110110
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
111111
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; \
112+
grep -q -F "define('CONFIG_DIR'," /var/www/html/libraries/vendor_config.php; \
112113
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
114+
grep -q -F "define('CONFIG_DIR', '/etc/phpmyadmin/');" /var/www/html/libraries/vendor_config.php; \
115+
php -l /var/www/html/libraries/vendor_config.php; \
113116
\
114117
apt-mark auto '.*' > /dev/null; \
115118
apt-mark manual $savedAptMark; \

0 commit comments

Comments
 (0)