path)
-def _get_build_timestamp():
- return time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime())
-
-
def transform_first_char(string, method):
"""Uses method() on the first character of string."""
if len(string) == 0:
options = None
config = None
buildserverid = None
-starttime = _get_build_timestamp()
+starttime = common.get_wiki_timestamp()
def main():
for build in app.builds:
wikilog = None
- build_starttime = _get_build_timestamp()
+ build_starttime = common.get_wiki_timestamp()
tools_version_log = ''
if not options.onserver:
tools_version_log = get_android_tools_version_log(build.ndk_path())
f.write('versionCode: %s\nversionName: %s\ncommit: %s\n' %
(build.versionCode, build.versionName, build.commit))
f.write('Build completed at '
- + _get_build_timestamp() + '\n')
+ + common.get_wiki_timestamp() + '\n')
f.write('\n' + tools_version_log + '\n')
f.write(str(e))
logging.error("Could not build app %s: %s" % (appid, e))
fdroidserverid = fp.read().rstrip()
txt = "* build session started at " + starttime + '\n' \
+ "* this build started at " + build_starttime + '\n' \
- + "* this build completed at " + _get_build_timestamp() + '\n' \
+ + "* this build completed at " + common.get_wiki_timestamp() + '\n' \
+ '* fdroidserverid: [https://gitlab.com/fdroid/fdroidserver/commit/' \
+ fdroidserverid + ' ' + fdroidserverid + ']\n\n'
if buildserverid:
examplesdir = prefix + '/examples'
return examplesdir
+
+
+def get_wiki_timestamp():
+ """Return current time in the standard format for posting to the wiki"""
+ return time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime())