Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7c5ff94e
Commit
7c5ff94e
authored
Mar 26, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3075 from edx/db/paver-find-theme-dir
Help paver find the theme directory
parents
704024f8
37c4cb36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
pavelib/assets.py
+2
-1
pavelib/utils/envs.py
+10
-6
No files found.
pavelib/assets.py
View file @
7c5ff94e
...
...
@@ -22,7 +22,8 @@ def theme_sass_paths():
if
edxapp_env
.
feature_flags
.
get
(
'USE_CUSTOM_THEME'
,
False
):
theme_name
=
edxapp_env
.
env_tokens
.
get
(
'THEME_NAME'
,
''
)
theme_root
=
path
(
edxapp_env
.
REPO_ROOT
)
.
dirname
()
/
"themes"
/
theme_name
parent_dir
=
path
(
edxapp_env
.
REPO_ROOT
)
.
abspath
()
.
parent
theme_root
=
parent_dir
/
"themes"
/
theme_name
return
[
theme_root
/
"static"
/
"sass"
]
else
:
...
...
pavelib/utils/envs.py
View file @
7c5ff94e
...
...
@@ -15,7 +15,7 @@ class Env(object):
"""
# Root of the git repository (edx-platform)
REPO_ROOT
=
path
(
__file__
)
.
dirname
()
.
dirname
()
.
dirname
()
REPO_ROOT
=
path
(
__file__
)
.
parent
.
parent
.
parent
# Service variant (lms, cms, etc.) configured with an environment variable
# We use this to determine which envs.json file to load.
...
...
@@ -29,12 +29,16 @@ class Env(object):
"""
# Find the env JSON file
env_path
=
"env.json"
if
self
.
SERVICE_VARIANT
is
not
None
:
env_path
=
self
.
REPO_ROOT
.
dirname
()
/
"{service}.env.json"
.
format
(
service
=
self
.
SERVICE_VARIANT
)
if
self
.
SERVICE_VARIANT
:
env_path
=
self
.
REPO_ROOT
.
parent
/
"{service}.env.json"
.
format
(
service
=
self
.
SERVICE_VARIANT
)
else
:
env_path
=
path
(
"env.json"
)
.
abspath
()
# If the file does not exist, issue a warning and return an empty dict
if
not
os
.
path
.
isfile
(
env_path
):
# If the file does not exist, here or one level up,
# issue a warning and return an empty dict
if
not
env_path
.
isfile
():
env_path
=
env_path
.
parent
.
parent
/
env_path
.
basename
()
if
not
env_path
.
isfile
():
print
(
"Warning: could not find environment JSON file "
"at '{path}'"
.
format
(
path
=
env_path
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment