Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
1beb1c95
Unverified
Commit
1beb1c95
authored
6 years ago
by
Jeremy Bowman
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #18430 from openfun/allow-using-development-settings-other-than-devstack
Allow using dev settings other than DEVSTACK
parents
35c5ad91
8bc26d5a
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pavelib/assets.py
+6
-2
6 additions, 2 deletions
pavelib/assets.py
pavelib/paver_tests/test_servers.py
+2
-2
2 additions, 2 deletions
pavelib/paver_tests/test_servers.py
with
8 additions
and
4 deletions
pavelib/assets.py
+
6
−
2
View file @
1beb1c95
...
...
@@ -766,7 +766,7 @@ def webpack(options):
static_root_cms
=
Env
.
get_django_setting
(
"
STATIC_ROOT
"
,
"
cms
"
,
settings
=
settings
)
config_path
=
Env
.
get_django_setting
(
"
WEBPACK_CONFIG_PATH
"
,
"
lms
"
,
settings
=
settings
)
environment
=
'
NODE_ENV={node_env} STATIC_ROOT_LMS={static_root_lms} STATIC_ROOT_CMS={static_root_cms}
'
.
format
(
node_env
=
"
production
"
if
settings
!=
Env
.
DEVSTACK_SETTINGS
else
"
development
"
,
node_env
=
"
development
"
if
config_path
==
'
webpack.dev.config.js
'
else
"
production
"
,
static_root_lms
=
static_root_lms
,
static_root_cms
=
static_root_cms
)
...
...
@@ -833,6 +833,7 @@ def listfy(data):
@task
@cmdopts
([
(
'
background
'
,
'
b
'
,
'
Background mode
'
),
(
'
settings=
'
,
'
s
'
,
"
Django settings (defaults to devstack)
"
),
(
'
theme-dirs=
'
,
'
-td
'
,
'
The themes dir containing all themes (defaults to None)
'
),
(
'
themes=
'
,
'
-t
'
,
'
The themes to add sass watchers for (defaults to None)
'
),
(
'
wait=
'
,
'
-w
'
,
'
How long to pause between filesystem scans.
'
)
...
...
@@ -846,6 +847,8 @@ def watch_assets(options):
if
tasks
.
environment
.
dry_run
:
return
settings
=
getattr
(
options
,
'
settings
'
,
Env
.
DEVSTACK_SETTINGS
)
themes
=
get_parsed_option
(
options
,
'
themes
'
)
theme_dirs
=
get_parsed_option
(
options
,
'
theme_dirs
'
,
[])
...
...
@@ -869,7 +872,7 @@ def watch_assets(options):
observer
.
start
()
# Run the Webpack file system watcher too
execute_webpack_watch
(
settings
=
Env
.
DEVSTACK_SETTINGS
)
execute_webpack_watch
(
settings
=
settings
)
if
not
getattr
(
options
,
'
background
'
,
False
):
# when running as a separate process, the main thread needs to loop
...
...
@@ -955,6 +958,7 @@ def update_assets(args):
'
pavelib.assets.watch_assets
'
,
options
=
{
'
background
'
:
not
args
.
debug
,
'
settings
'
:
args
.
settings
,
'
theme_dirs
'
:
args
.
theme_dirs
,
'
themes
'
:
args
.
themes
,
'
wait
'
:
[
float
(
args
.
wait
)]
...
...
This diff is collapsed.
Click to expand it.
pavelib/paver_tests/test_servers.py
+
2
−
2
View file @
1beb1c95
...
...
@@ -247,7 +247,7 @@ class TestPaverServerTasks(PaverTestCase):
[
c
.
format
(
settings
=
expected_asset_settings
)
for
c
in
EXPECTED_PRINT_SETTINGS_COMMAND
]
)
expected_messages
.
append
(
EXPECTED_WEBPACK_COMMAND
.
format
(
node_env
=
"
production
"
if
expected_asset_settings
!=
Env
.
DEVSTACK_SETTINGS
else
"
development
"
,
node_env
=
"
production
"
,
static_root_lms
=
None
,
static_root_cms
=
None
,
webpack_config_path
=
None
...
...
@@ -292,7 +292,7 @@ class TestPaverServerTasks(PaverTestCase):
[
c
.
format
(
settings
=
expected_asset_settings
)
for
c
in
EXPECTED_PRINT_SETTINGS_COMMAND
]
)
expected_messages
.
append
(
EXPECTED_WEBPACK_COMMAND
.
format
(
node_env
=
"
production
"
if
expected_asset_settings
!=
Env
.
DEVSTACK_SETTINGS
else
"
development
"
,
node_env
=
"
production
"
,
static_root_lms
=
None
,
static_root_cms
=
None
,
webpack_config_path
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment