Exemplo n.º 1
0
	output = platform_dir + "/publish/"
	backup = platform_dir + "/backup/"
	
	if not os.path.exists(platform_dir):	
		os.mkdir(platform_dir)
	if not os.path.exists(output):	
		os.mkdir(output)
	if not os.path.exists(backup):	
		os.mkdir(backup)
	noconfirm = True
	if "-a" in os.sys.argv :
		noconfirm = True
	if os.path.exists("filelist.xml"):
		from xml.etree.ElementTree import ElementTree,Element
		version1 =  ElementTree().parse("filelist.xml").get("version")
		if version.split('.')[0] !=  version1.split('.')[0] :
			type = 1
		else :
			type = 3
	else :
		os.system("cp file_bak/filelist.xml .")
		type = 1
	print "====output====",globals()['output']
	backoutput =  output + version + "/"
	if not os.path.exists(backoutput):
		os.mkdir(backoutput)
	clear_dir(backoutput)
	if type == 1 :
		noconfirm = True
	create_version_list(version, type)
	create_version_file()