Skip to content

Commit e2d5ddd

Browse files
authored
fix: Take patterns into account when computing hash (#169)
1 parent ba4dbbb commit e2d5ddd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

package.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,19 @@ def commands_step(path, commands):
739739
else:
740740
pip_requirements_step(pip_requirements, prefix,
741741
required=True)
742+
742743
if path:
743744
step('zip', path, prefix)
744-
hash(path)
745+
if patterns:
746+
# Take patterns into account when computing hash
747+
pf = ZipContentFilter(args=self._args)
748+
pf.compile(patterns)
749+
750+
for path_from_pattern in pf.filter(path, prefix):
751+
hash(path_from_pattern)
752+
else:
753+
hash(path)
754+
745755
if patterns:
746756
step('clear:filter')
747757
else:

0 commit comments

Comments
 (0)