mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Fix webpack command to run in CI
This commit is contained in:
4
setup.py
4
setup.py
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import distutils.cmd
|
import distutils.cmd
|
||||||
import setuptools.command.build_py
|
import setuptools.command.build_py
|
||||||
@@ -17,7 +18,8 @@ class WebpackBuildCommand(setuptools.command.build_py.build_py):
|
|||||||
"""Prefix Python build with Webpack asset build"""
|
"""Prefix Python build with Webpack asset build"""
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
subprocess.run(['webpack', '--config', 'webpack.prod.js'], check=True)
|
if not 'CI' in os.environ:
|
||||||
|
subprocess.run(['webpack', '--config', 'webpack.prod.js'], check=True)
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user