Moznost vynechat 'data' adresar
This commit is contained in:
parent
37bdcdaf24
commit
9b41ebdc97
28
generate.py
28
generate.py
@ -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,13 +215,15 @@ if __name__ == "__main__":
|
||||
|
||||
approotdir = build["approotdir"]
|
||||
outputdir = build["outputdir"]
|
||||
datadir = build["datadir"]
|
||||
if "datadir" in build:
|
||||
datadir = build["datadir"]
|
||||
if "flist" in build:
|
||||
flist = build["flist"]
|
||||
|
||||
# Vycistime vystupni adresare
|
||||
cleanup(outputdir)
|
||||
cleanup(datadir)
|
||||
if datadir is not None:
|
||||
cleanup(datadir)
|
||||
|
||||
# Zacneme kombinaci soubou
|
||||
if "combine" in build:
|
||||
@ -236,13 +239,14 @@ if __name__ == "__main__":
|
||||
copyfiles(copy, approotdir, outputdir)
|
||||
|
||||
# .. a koncime prekopirovanim souboru do vystupniho adresare s prubeznou kompresi pozadovanych souboru a vytvareni flist.txt
|
||||
deploy = []
|
||||
if flist is not None:
|
||||
flistcontent = ":" + version + "\r\n"
|
||||
if "copy" in build:
|
||||
deploy = build["copy"]
|
||||
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.close()
|
||||
if datadir is not None:
|
||||
deploy = []
|
||||
if flist is not None:
|
||||
flistcontent = ":" + version + "\r\n"
|
||||
if "copy" in build:
|
||||
deploy = build["copy"]
|
||||
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('ascii', 'ignore'))
|
||||
outfile.close()
|
||||
|
Loading…
Reference in New Issue
Block a user