Fix emoji cache setup when not using provision.py.

Moves creating the emoji folder from the provisioning script to
the build_emoji script.

Fixes the fact that the emoji cache directory wasn't being created
when not using the provision.py script.
This commit is contained in:
Carey Metcalfe 2017-05-21 22:55:42 -04:00 committed by Tim Abbott
parent f9f00374d6
commit ab2cfadcaa
2 changed files with 6 additions and 5 deletions

View File

@ -214,10 +214,6 @@ def main(options):
# create linecoverage directory`var/node-coverage`
run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH])
if not os.path.isdir(EMOJI_CACHE_PATH):
run(["sudo", "mkdir", EMOJI_CACHE_PATH])
run(["sudo", "chown", "%s:%s" % (user_id, user_id), EMOJI_CACHE_PATH])
run(["tools/setup/emoji/download-emoji-data"])
run(["tools/setup/emoji/build_emoji"])
run(["tools/setup/build_pygments_data.py"])
run(["scripts/setup/generate_secrets.py", "--development"])

View File

@ -82,7 +82,12 @@ EMOJI_POS_INFO_TEMPLATE = """\
}
"""
# change directory
# Make and enter emoji directory
user_id = os.getuid()
if not os.path.isdir(EMOJI_CACHE_PATH):
run(["sudo", "mkdir", EMOJI_CACHE_PATH])
run(["sudo", "chown", "%s:%s" % (user_id, user_id), EMOJI_CACHE_PATH])
run(["tools/setup/emoji/download-emoji-data"])
os.chdir(EMOJI_SCRIPT_DIR_PATH)
if 'TRAVIS' in os.environ: