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__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
version = getgitversion()
|
version = getgitversion()
|
||||||
|
datadir = None
|
||||||
templatevars['version'] = version
|
templatevars['version'] = version
|
||||||
print("Web version " + version)
|
print("Web version " + version)
|
||||||
with open(PROJECT_FILE) as fd:
|
with open(PROJECT_FILE) as fd:
|
||||||
@ -214,13 +215,15 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
approotdir = build["approotdir"]
|
approotdir = build["approotdir"]
|
||||||
outputdir = build["outputdir"]
|
outputdir = build["outputdir"]
|
||||||
datadir = build["datadir"]
|
if "datadir" in build:
|
||||||
|
datadir = build["datadir"]
|
||||||
if "flist" in build:
|
if "flist" in build:
|
||||||
flist = build["flist"]
|
flist = build["flist"]
|
||||||
|
|
||||||
# Vycistime vystupni adresare
|
# Vycistime vystupni adresare
|
||||||
cleanup(outputdir)
|
cleanup(outputdir)
|
||||||
cleanup(datadir)
|
if datadir is not None:
|
||||||
|
cleanup(datadir)
|
||||||
|
|
||||||
# Zacneme kombinaci soubou
|
# Zacneme kombinaci soubou
|
||||||
if "combine" in build:
|
if "combine" in build:
|
||||||
@ -236,13 +239,14 @@ if __name__ == "__main__":
|
|||||||
copyfiles(copy, approotdir, outputdir)
|
copyfiles(copy, approotdir, outputdir)
|
||||||
|
|
||||||
# .. a koncime prekopirovanim souboru do vystupniho adresare s prubeznou kompresi pozadovanych souboru a vytvareni flist.txt
|
# .. a koncime prekopirovanim souboru do vystupniho adresare s prubeznou kompresi pozadovanych souboru a vytvareni flist.txt
|
||||||
deploy = []
|
if datadir is not None:
|
||||||
if flist is not None:
|
deploy = []
|
||||||
flistcontent = ":" + version + "\r\n"
|
if flist is not None:
|
||||||
if "copy" in build:
|
flistcontent = ":" + version + "\r\n"
|
||||||
deploy = build["copy"]
|
if "copy" in build:
|
||||||
copycompresstree(outputdir, datadir, deploy, datadir)
|
deploy = build["copy"]
|
||||||
if flist is not None:
|
copycompresstree(outputdir, datadir, deploy, datadir)
|
||||||
with open(os.path.normpath(os.path.join(datadir, flist)), 'wb') as outfile:
|
if flist is not None:
|
||||||
outfile.write(flistcontent.encode('utf-8'))
|
with open(os.path.normpath(os.path.join(datadir, flist)), 'wb') as outfile:
|
||||||
outfile.close()
|
outfile.write(flistcontent.encode('ascii', 'ignore'))
|
||||||
|
outfile.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user