Skip to content

Commit

Permalink
Check config generation in install
Browse files Browse the repository at this point in the history
  • Loading branch information
joernott committed Jun 26, 2024
1 parent 33a5a35 commit 7721d80
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/oxid-esales/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,27 @@ docker compose "${install_container_method}" -T \
--shop-directory /var/www/source \
--compile-directory "${OXID_BUILD_DIRECTORY}"

if diff -q source/source/config.inc.php.dist source/source/config.inc.php; then
echo "source/config.inc.php has not been modified"
if diff -q source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php.dist source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php; then
echo "vendor/oxid-esales/oxideshop-ce/source/config.inc.php has not been modified"
echo "No valid config"
exit 1
else
echo "Config file is vendor/oxid-esales/oxideshop-ce/source/config.inc.php copying to source/config.inc.php"
CONFIG_FILE=vendor/oxid-esales/oxideshop-ce/source/config.inc.php
cp source/${CONFIG_FILE} source/source/config.inc.php
fi
else
echo "Config file is source/config.inc.php"
CONFIG_FILE=source/config.inc.php
if diff -q source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php.dist source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php; then
echo "vendor/oxid-esales/oxideshop-ce/source/config.inc.php has not been modified, copying from source"
cp source/${CONFIG_FILE} source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php
fi

fi

# Activate iDebug
if [ "${install_config_idebug}" == 'true' ]; then
if [ -f source/source/config.inc.php ]; then
Expand Down
4 changes: 3 additions & 1 deletion tests/scripts/codeception.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ vendor/bin/codecept run acceptance \
RESULT=$?
echo "Codecept run exited with error code ${RESULT}"
[[ ! -d tests/Output ]] && mkdir tests/Output
cp tests/Codeception/_output/* tests/Output
if [ -n "$(find tests/Codeception/_output -type f)" ]; then
cp tests/Codeception/_output/* tests/Output
fi
if [ ! -s "tests/Output/codeception_Acceptance.txt" ]; then
echo -e "\033[0;31mLog file is empty! Seems like no tests have been run!\033[0m"
RESULT=1
Expand Down
4 changes: 3 additions & 1 deletion tests/scripts/shop-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ echo "codecept build exited with error code ${RESULT}"
RESULT=$?
echo "codecept run exited with error code ${RESULT}"
[[ ! -d tests/Output ]] && mkdir tests/Output
cp tests/Codeception/_output/* tests/Output
if [ -n "$(find tests/Codeception/_output -type f)" ]; then
cp tests/Codeception/_output/* tests/Output
fi
if [ ! -s "tests/Output/codeception_${SUITE}.txt" ]; then
echo -e "\033[0;31mLog file is empty! Seems like no tests have been run!\033[0m"
RESULT=1
Expand Down

0 comments on commit 7721d80

Please sign in to comment.