From 67bbbbb0078ea8544ad0828aa3c5b04e7bc2e51e Mon Sep 17 00:00:00 2001 From: Harshit Bansal Date: Thu, 9 Aug 2018 19:41:56 +0000 Subject: [PATCH] emoji: Move logic for hard-coding octopus emoji. This logic was incorrectly placed in `setup_old_emoji_farm()` while it should have been placed in `setup_emoji_farm()`. --- tools/setup/emoji/build_emoji | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/setup/emoji/build_emoji b/tools/setup/emoji/build_emoji index 930b99d6ec..0955fb5b97 100755 --- a/tools/setup/emoji/build_emoji +++ b/tools/setup/emoji/build_emoji @@ -163,6 +163,12 @@ def setup_emoji_farm(cache_path: str, emoji_data: List[Dict[str, Any]]) -> None: output_sprite_sheet = os.path.join(cache_path, 'sheet_%s_64.png' % (emojiset,)) run(['cp', input_sprite_sheet, output_sprite_sheet]) + # We hardcode octopus emoji image to Google emojiset's old + # "cute octopus" image. Copy it to the emoji farms. + input_img_file = os.path.join(EMOJI_SCRIPT_DIR_PATH, '1f419.png') + output_img_file = os.path.join(cache_path, 'images-' + emojiset + '-64', '1f419.png') + run(['cp', input_img_file, output_img_file]) + generate_sprite_css_files(cache_path, emoji_data) def setup_old_emoji_farm(cache_path: str, @@ -197,13 +203,6 @@ def setup_old_emoji_farm(cache_path: str, except FileExistsError: pass - # We hardcode octopus emoji image to Google emojiset's old - # "cute octopus" image. Copy it to the emoji farms. - for emojiset in EMOJISETS: - input_img_file = os.path.join(EMOJI_SCRIPT_DIR_PATH, '1f419.png') - output_img_file = os.path.join(cache_path, 'images-' + emojiset + '-64', '1f419.png') - run(['cp', input_img_file, output_img_file]) - def generate_map_files(cache_path: str, emoji_catalog: Dict[str, List[str]]) -> None: # This function generates the various data files consumed by webapp, mobile apps, bugdown etc. names = emoji_names_for_picker(EMOJI_NAME_MAPS)