comparison LightTools/release.py @ 47:81d413160824

Added a release
author koryspansel
date Thu, 22 Sep 2011 14:38:07 -0700
parents a379bce1aeb1
children 48705dc6e568
comparison
equal deleted inserted replaced
46:a379bce1aeb1 47:81d413160824
49 shutil.copyfile(join(data, filename), filepath) 49 shutil.copyfile(join(data, filename), filepath)
50 50
51 if not isdir(location): 51 if not isdir(location):
52 os.makedirs(location) 52 os.makedirs(location)
53 53
54 current_date = datetime.datetime.now() 54 with zipfile.ZipFile(join(location, project + datetime.datetime.now().strftime('%Y%m%d%I%M%p') + '.zip'), 'w') as handle:
55 suffix = current_date.strftime('%Y%m%d%I%M%p')
56 print suffix
57
58 with zipfile.ZipFile(join(location, project + '.zip'), 'w') as handle:
59 for filename in relative_walk(build): 55 for filename in relative_walk(build):
60 handle.write(join(build, filename), filename) 56 handle.write(join(build, filename), filename)
61 57
62 if __name__ == '__main__': 58 if __name__ == '__main__':
63 root = normpath(join(dirname(sys.argv[0]), '..')) 59 root = normpath(join(dirname(sys.argv[0]), '..'))