mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Use today's date for new files.
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
from util import compare
|
from util import compare
|
||||||
|
|
||||||
|
|
||||||
@@ -134,6 +135,9 @@ def generateJavascriptFile():
|
|||||||
if os.path.exists(translatedFile):
|
if os.path.exists(translatedFile):
|
||||||
# Get the last modified date of the file in seconds and round to days
|
# Get the last modified date of the file in seconds and round to days
|
||||||
date = os.popen("git log -1 --format=%ct -- \"" + translatedFile + "\"").read().strip()
|
date = os.popen("git log -1 --format=%ct -- \"" + translatedFile + "\"").read().strip()
|
||||||
|
# if date is empty, use today's date
|
||||||
|
if date == "":
|
||||||
|
date = time.time()
|
||||||
dateDay = int(date) // 86400
|
dateDay = int(date) // 86400
|
||||||
dataForFile.append(dateDay)
|
dataForFile.append(dateDay)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user