Use "npm ci" to build pretix (#5451)

This commit is contained in:
Raphael Michel
2025-09-19 14:34:30 +02:00
committed by GitHub
parent dd441c09f7
commit 3b30553880
2 changed files with 3 additions and 3 deletions

View File

@@ -25,8 +25,8 @@ coverage:
coverage run -m py.test coverage run -m py.test
npminstall: npminstall:
# keep this in sync with setup.py! # keep this in sync with pretix/_build.py!
mkdir -p pretix/static.dist/node_prefix/ mkdir -p pretix/static.dist/node_prefix/
cp -r pretix/static/npm_dir/* pretix/static.dist/node_prefix/ cp -r pretix/static/npm_dir/* pretix/static.dist/node_prefix/
npm install --prefix=pretix/static.dist/node_prefix npm ci --prefix=pretix/static.dist/node_prefix

View File

@@ -39,7 +39,7 @@ def npm_install():
node_prefix = os.path.join(here, 'static.dist', 'node_prefix') node_prefix = os.path.join(here, 'static.dist', 'node_prefix')
os.makedirs(node_prefix, exist_ok=True) os.makedirs(node_prefix, exist_ok=True)
shutil.copytree(os.path.join(here, 'static', 'npm_dir'), node_prefix, dirs_exist_ok=True) shutil.copytree(os.path.join(here, 'static', 'npm_dir'), node_prefix, dirs_exist_ok=True)
subprocess.check_call('npm install', shell=True, cwd=node_prefix) subprocess.check_call('npm ci', shell=True, cwd=node_prefix)
npm_installed = True npm_installed = True