2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 02:25:38 +00:00

Packager: easier to parse debug messages (#8083)

* Add new version to logging

* Add easier to search logging

* shorten appended string

* make migrations that run on fresh installs easier to read
This commit is contained in:
Matthias Mair
2024-09-05 23:33:59 +02:00
committed by GitHub
parent f8c53bc9e5
commit 3d9db2543d
5 changed files with 96 additions and 70 deletions

View File

@ -2,6 +2,7 @@
#
# packager.io preinstall/preremove script
#
echo "# PRI01| Running preinstall script - start - $(date)"
PATH=${APP_HOME}/env/bin:${APP_HOME}/:/sbin:/bin:/usr/sbin:/usr/bin:
# Envs that should be passed to setup commands
@ -10,11 +11,13 @@ export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVEN
if test -f "${APP_HOME}/env/bin/pip"; then
# Check if clear-generated is available
if sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke int.clear-generated --help" > /dev/null 2>&1; then
echo "# Clearing precompiled files"
echo "# PRI02| Clearing precompiled files"
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke int.clear-generated"
else
echo "# Clearing precompiled files - skipping"
echo "# PRI02| Clearing precompiled files - skipping"
fi
else
echo "# No python environment found - skipping"
echo "# PRI02| No python environment found - skipping"
fi
echo "# PRI03| Running preinstall script - done - $(date)"