Skip to content

Commit

Permalink
fix: Take patterns into account when computing hash (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdecat authored Aug 30, 2021
1 parent ba4dbbb commit e2d5ddd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion package.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,19 @@ def commands_step(path, commands):
else:
pip_requirements_step(pip_requirements, prefix,
required=True)

if path:
step('zip', path, prefix)
hash(path)
if patterns:
# Take patterns into account when computing hash
pf = ZipContentFilter(args=self._args)
pf.compile(patterns)

for path_from_pattern in pf.filter(path, prefix):
hash(path_from_pattern)
else:
hash(path)

if patterns:
step('clear:filter')
else:
Expand Down

0 comments on commit e2d5ddd

Please sign in to comment.