- Timestamp:
- 2011-08-08 10:26:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/31/build_games.py
r2620 r2621 10 10 import re 11 11 12 should_write_results = False 12 13 13 14 output_dir = abspath("pelit") … … 59 60 path = abspath(d) 60 61 time = datetime(2000, 1, 1) 61 if exists(join(path, ".svn")):62 if should_write_results and exists(join(path, ".svn")): 62 63 call("svn update " + path, shell=True) 63 64 outputs = Popen("svn info " + path, stdout=PIPE).communicate() … … 78 79 if n == 6: return "Sunnuntai" 79 80 raise Exception("Invalid weekday number") 81 80 82 81 83 def write_result(author, name, success, last_changed_date): … … 106 108 107 109 success = build(projects[0]) 108 write_result(author, project_name, success, last_changed_date) 110 111 if should_write_results: 112 write_result(author, project_name, success, last_changed_date) 109 113 110 114 if success: … … 131 135 132 136 137 def parse_arguments(): 138 for arg in sys.argv[1:]: 139 if arg == "--write-results": 140 global should_write_results 141 should_write_results = True 142 else: 143 raise Exception("Unknown argument: " + arg) 144 145 133 146 def main(): 134 147 try: 148 parse_arguments() 135 149 check_requirements() 136 150 create_output_directory() 137 create_build_result_directory()151 if should_write_results: create_build_result_directory() 138 152 build_games() 139 153 except KeyboardInterrupt:
Note: See TracChangeset
for help on using the changeset viewer.