Skip to content

Commit

Permalink
Include modified files in the generated matrix zip
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts committed Feb 27, 2021
1 parent 2fbfac7 commit 03b7f9f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions addon_submitter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ def create_zip(zip_name, addon_id, subdirectory):
"""
logger.info('Creating ZIP file...')
if subdirectory:
shell('git', 'archive', '-o', '{}.zip'.format(zip_name), 'HEAD', '--',
addon_id)
shell(
'sh', '-c',
'HASH=$(git stash create); git archive -o %s.zip ${HASH:-HEAD} -- %s' % (zip_name, addon_id)
)
else:
shell('git', 'archive', '-o', '{}.zip'.format(zip_name),
'--prefix', '{}/'.format(addon_id), 'HEAD')
shell(
'sh', '-c',
'HASH=$(git stash create); git archive -o %s.zip --prefix %s/ ${HASH:-HEAD}' % (zip_name, addon_id)
)
logger.info('ZIP created successfully.')


Expand Down

0 comments on commit 03b7f9f

Please sign in to comment.