fix: allow templating asset glob patterns #906
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes asset paths with template variables not working with glob patterns (#867).
Problem
Asset paths containing template variables like
${nextRelease.version}
were processed after glob pattern expansion, causing patterns like"release/my-project-v${nextRelease.version}*.zip"
to fail. The glob would try to find files with literal${nextRelease.version}
in the filename before template substitution occurred.Solution
This PR moves template expansion to occur before asset globbing by:
Example
This configuration now works correctly:
When
nextRelease.version
is"1.0.0"
, this expands to"release/my-project-v1.0.0*.zip"
before globbing, correctly matching files like:release/my-project-v1.0.0.zip
release/my-project-v1.0.0-alpha.zip
release/my-project-v1.0.0-beta.zip
Testing
This follows the same approach as originally implemented in #892.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.