happy-psychiatrist-90774
07/23/2024, 10:56 AMDigest of the source files' dir
2. Create a DigestSubset of the files that I need to rename + remove prefix + add new prefix
3. Create a DigestSubset of the rest of the files that I didn't need to rename
4. Merge both together
5. Change prefix to the new location
However... things got complicated because I couldn't use the ! operator on step 3 to get "the other files"happy-psychiatrist-90774
07/23/2024, 10:58 AM# create main digest
digest = await Get(
Digest,
PathGlobs(globs=[f'{src_path}/**']),
)
# extract digest for name substitution
digest_subset = await Get(
Digest,
DigestSubset(digest, PathGlobs([f'{name_placeholder}/*'])),
)
digest_subset = await Get(
Digest,
RemovePrefix(digest_subset, name_placeholder),
)
digest_subset = await Get(
Digest,
AddPrefix(digest_subset, new_name),
)
# extract digest files that don't need substitution
digest_norename = await Get(
Digest,
DigestSubset(digest, PathGlobs([f'!{name_placeholder}/*'])),
)
# merge digests
digest_final = await Get(
Digest,
MergeDigests([digest_norename, digest_subset]),
)curved-television-6568
07/25/2024, 6:29 AM