Skip to content

Commit

Permalink
feat: remove unused action upgrade part
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Oct 18, 2024
1 parent c24e0cd commit f77483b
Showing 1 changed file with 3 additions and 32 deletions.
35 changes: 3 additions & 32 deletions .github/action_upgrade.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
#!/bin/bash

if [[ $CHANNEL == "local" ]]; then
if [[ "${FROM:0:1}" == 1 ]] && [[ "${VERSION:0:1}" == 1 ]]; then
if [[ "${FROM:2:1}" == "${VERSION:2:1}" ]]; then
UPDATE_THEME=0
else
UPDATE_THEME=1
fi
else
if [[ "${FROM:0:1}" == "${VERSION:0:1}" ]]; then
UPDATE_THEME=0
else
UPDATE_THEME=1
fi
fi

docker exec -u www-data prestashop_autoupgrade mkdir admin-dev/autoupgrade/download
docker exec -u www-data prestashop_autoupgrade curl -L $ARCHIVE_URL -o admin-dev/autoupgrade/download/prestashop.zip
docker exec -u www-data prestashop_autoupgrade curl -L $XML_URL -o modules/autoupgrade/download/prestashop.xml

FILE_COUNT=$(docker exec -u www-data prestashop_autoupgrade ls admin-dev/autoupgrade/backup/ | wc -l)
if [[ "$FILE_COUNT" == 0 ]]; then
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console backup:create admin-dev
fi

echo "{\"channel\":\"local\",\"archive_zip\":\"prestashop.zip\",\"archive_num\":\"${VERSION}\", \"archive_xml\":\"prestashop.xml\", \"PS_AUTOUP_CHANGE_DEFAULT_THEME\":${UPDATE_THEME}" > modules/autoupgrade/config.json
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console update:start --action="CompareReleases" --config-file-path="modules/autoupgrade/config.json" -vvv admin-dev
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console update:start --config-file-path="modules/autoupgrade/config.json" -vvv admin-dev
fi

docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console backup:create admin-dev -vvv
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console update:start --action="CompareReleases" -vvv admin-dev
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console update:start admin-dev -vvv
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console backup:create admin-dev
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console update:start --action="CompareReleases" admin-dev
docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/bin/console update:start admin-dev

0 comments on commit f77483b

Please sign in to comment.