mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-18 02:36:31 +00:00
fix: package - various changes (#9802)
* fail on install * move site setting up to ensure site is set early * fix version file path * ensure subdirs are created too * ensure downloaded files are also collected into static * update order * bump qc workers * update version
This commit is contained in:
22
.github/workflows/qc_checks.yaml
vendored
22
.github/workflows/qc_checks.yaml
vendored
@@ -65,7 +65,7 @@ jobs:
|
||||
|
||||
javascript:
|
||||
name: Style - Classic UI [JS]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit"]
|
||||
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
|
||||
pre-commit:
|
||||
name: Style [pre-commit]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: paths-filter
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
mkdocs:
|
||||
name: Style [Documentation]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: paths-filter
|
||||
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
|
||||
schema:
|
||||
name: Tests - API Schema Documentation
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: paths-filter
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
env:
|
||||
@@ -204,7 +204,7 @@ jobs:
|
||||
|
||||
schema-push:
|
||||
name: Push new schema
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [paths-filter, schema]
|
||||
if: needs.schema.result == 'success' && github.ref == 'refs/heads/master' && needs.paths-filter.outputs.api == 'true' && github.repository_owner == 'inventree'
|
||||
env:
|
||||
@@ -232,7 +232,7 @@ jobs:
|
||||
|
||||
python:
|
||||
name: Tests - inventree-python
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@@ -274,7 +274,7 @@ jobs:
|
||||
|
||||
coverage:
|
||||
name: Tests - DB [SQLite] + Coverage ${{ matrix.python_version }}
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@@ -317,7 +317,7 @@ jobs:
|
||||
|
||||
postgres:
|
||||
name: Tests - DB [PostgreSQL]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
|
||||
@@ -361,7 +361,7 @@ jobs:
|
||||
|
||||
mysql:
|
||||
name: Tests - DB [MySQL]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@@ -505,7 +505,7 @@ jobs:
|
||||
|
||||
platform_ui:
|
||||
name: Tests - Platform UI
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
@@ -561,7 +561,7 @@ jobs:
|
||||
|
||||
platform_ui_build:
|
||||
name: Build - UI Platform
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
|
@@ -300,7 +300,7 @@ function update_or_install() {
|
||||
# Run update as app user
|
||||
echo "# POI12| Updating InvenTree"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install wheel"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update | sed -e 's/^/# POI12| u | /;'"
|
||||
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "set -e && cd ${APP_HOME} && invoke update | sed -e 's/^/# POI12| u | /;'"
|
||||
|
||||
# Make sure permissions are correct again
|
||||
echo "# POI12| Set permissions for data dir and media: ${DATA_DIR}"
|
||||
|
@@ -53,12 +53,12 @@ create_admin
|
||||
|
||||
# run updates
|
||||
stop_inventree
|
||||
set_site
|
||||
update_or_install
|
||||
# Write config file
|
||||
if [ "${SETUP_CONF_LOADED}" = "true" ]; then
|
||||
set_env
|
||||
fi
|
||||
set_site
|
||||
start_inventree
|
||||
|
||||
# show info
|
||||
|
@@ -71,7 +71,7 @@ BASE_DIR = config.get_base_dir()
|
||||
CONFIG = config.load_config_data(set_cache=True)
|
||||
|
||||
# Load VERSION data if it exists
|
||||
version_file = BASE_DIR.parent.joinpath('VERSION')
|
||||
version_file = BASE_DIR.parent.parent.parent.joinpath('VERSION')
|
||||
if version_file.exists():
|
||||
print('load version from file')
|
||||
load_dotenv(version_file)
|
||||
|
@@ -18,7 +18,7 @@ from django.conf import settings
|
||||
from .api_version import INVENTREE_API_TEXT, INVENTREE_API_VERSION
|
||||
|
||||
# InvenTree software version
|
||||
INVENTREE_SW_VERSION = '0.17.13'
|
||||
INVENTREE_SW_VERSION = '0.17.14'
|
||||
|
||||
|
||||
logger = logging.getLogger('inventree')
|
||||
|
3
tasks.py
3
tasks.py
@@ -1360,7 +1360,7 @@ def frontend_download(
|
||||
# if clean, delete static/web directory
|
||||
if clean:
|
||||
shutil.rmtree(dest_path, ignore_errors=True)
|
||||
dest_path.mkdir()
|
||||
dest_path.mkdir(parents=True, exist_ok=True)
|
||||
info(f'Cleaned directory: {dest_path}')
|
||||
|
||||
# unzip build to static folder
|
||||
@@ -1385,6 +1385,7 @@ def frontend_download(
|
||||
info(f'Downloaded frontend build to temporary file: {dst.name}')
|
||||
|
||||
handle_extract(dst.name)
|
||||
static(c)
|
||||
|
||||
def check_already_current(tag=None, sha=None):
|
||||
"""Check if the currently available frontend is already the requested one."""
|
||||
|
Reference in New Issue
Block a user