Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Allow zipfile generation during a rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Peck committed Sep 7, 2016
1 parent 85a44a3 commit ce8965f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.py
Expand Up @@ -1299,11 +1299,13 @@ def zip_files(relative_dir, source_files, output_dir, output_file):
progress_print("Zip file: ", output_file)
cmd = [zip_bin]

# dirty hack
if output_repo is not None and output_repo.git.ls_files(output_file.encode('utf8')) != '':
# if we're not rebuilding everything, and if the file exists in git
# then check it out from git so that the zipfile is not regenerated
if not rebuild and output_repo is not None and output_repo.git.ls_files(output_file.encode('utf8')) != '':
progress_print("Pulling existing zipfile from git.")
output_repo.git.checkout('--', output_file.encode('utf8'))


# if the zip file exists, don't regenerate it
if os.path.exists(output_file):
# cmd.append('-u')
progress_print("Zipfile already exists. Skipping.")
Expand Down

0 comments on commit ce8965f

Please sign in to comment.