Moznost vynechat 'data' adresar

This commit is contained in:
Pavel Brychta 2020-07-03 09:03:33 +02:00
parent 37bdcdaf24
commit 9b41ebdc97

View File

@ -204,6 +204,7 @@ def getgitversion():
if __name__ == "__main__":
version = getgitversion()
datadir = None
templatevars['version'] = version
print("Web version " + version)
with open(PROJECT_FILE) as fd:
@ -214,12 +215,14 @@ if __name__ == "__main__":
approotdir = build["approotdir"]
outputdir = build["outputdir"]
if "datadir" in build:
datadir = build["datadir"]
if "flist" in build:
flist = build["flist"]
# Vycistime vystupni adresare
cleanup(outputdir)
if datadir is not None:
cleanup(datadir)
# Zacneme kombinaci soubou
@ -236,6 +239,7 @@ if __name__ == "__main__":
copyfiles(copy, approotdir, outputdir)
# .. a koncime prekopirovanim souboru do vystupniho adresare s prubeznou kompresi pozadovanych souboru a vytvareni flist.txt
if datadir is not None:
deploy = []
if flist is not None:
flistcontent = ":" + version + "\r\n"
@ -244,5 +248,5 @@ if __name__ == "__main__":
copycompresstree(outputdir, datadir, deploy, datadir)
if flist is not None:
with open(os.path.normpath(os.path.join(datadir, flist)), 'wb') as outfile:
outfile.write(flistcontent.encode('utf-8'))
outfile.write(flistcontent.encode('ascii', 'ignore'))
outfile.close()