mirror of https://github.com/zulip/zulip.git
build_emoji: Inline get_success_stamp.
So, `source_emoji_dump` is not the greatest variable name, but at least we now define it relative to its parent instead of the `.success-stamp` file. (And then `success_stamp` is just another join.)
This commit is contained in:
parent
aae28e41d0
commit
bf3decfd0c
|
@ -77,8 +77,9 @@ if 'TRAVIS' in os.environ:
|
|||
EMOJI_CACHE_PATH = "/home/travis/zulip-emoji-cache"
|
||||
|
||||
def main() -> None:
|
||||
success_stamp = get_success_stamp()
|
||||
source_emoji_dump = os.path.dirname(success_stamp)
|
||||
sha1_hexdigest = generate_sha1sum_emoji(ZULIP_PATH)
|
||||
source_emoji_dump = os.path.join(EMOJI_CACHE_PATH, sha1_hexdigest, 'emoji')
|
||||
success_stamp = os.path.join(source_emoji_dump, '.success-stamp')
|
||||
|
||||
if not os.path.exists(success_stamp):
|
||||
print("Dumping emojis ...")
|
||||
|
@ -101,10 +102,6 @@ def main() -> None:
|
|||
for filename in to_remove:
|
||||
os.remove(os.path.join(TARGET_EMOJI_STYLES, filename))
|
||||
|
||||
def get_success_stamp() -> str:
|
||||
sha1_hexdigest = generate_sha1sum_emoji(ZULIP_PATH)
|
||||
return os.path.join(EMOJI_CACHE_PATH, sha1_hexdigest, 'emoji', '.success-stamp')
|
||||
|
||||
def percent(f: float) -> str:
|
||||
return '%0.3f%%' % (f * 100,)
|
||||
|
||||
|
|
Loading…
Reference in New Issue