-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Introduce target file support for processed source files #54
Conversation
Code Climate has analyzed commit a4aabed and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 83.4% (0.1% change). View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## develop #54 +/- ##
=============================================
+ Coverage 83.34% 83.43% +0.08%
- Complexity 563 567 +4
=============================================
Files 84 84
Lines 1519 1527 +8
=============================================
+ Hits 1266 1274 +8
Misses 253 253
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b9a0bf2
to
f81f17f
Compare
f81f17f
to
c5b3ac7
Compare
This commit introduces a new schema configuration "target" for file conditions within step configuration for processed source files and processed shared source files. It allows to override the default path determination behavior, e.g. when multiple files exist as source files, while they should have the same target name, depending on a given file condition. Example: Two source files `LICENSE.GPL-2.0.txt` and `LICENSE.GPL-3.0.txt` exist. Both files must be named `LICENSE.txt` in the resulting project. The file processing itself depends on given conditions: If the user selects "GPL 2.0" as license, `LICENSE.GPL-2.0.txt` will be processed, if "GPL 3.0" is selected, `LICENSE.GPL-3.0.txt` will be processed. Example configuration: steps: - type: processSourceFiles fileConditions: - path: 'LICENSE.GPL-2.0.txt' if: 'license == "GPL-2.0"' target: 'LICENSE.txt' - path: 'LICENSE.GPL-3.0.txt' if: 'license == "GPL-3.0"' target: 'LICENSE.txt'
c5b3ac7
to
a4aabed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM 👍 🚀
Feature description:
This PR introduces a new schema configuration "target" for file conditions within step configuration for processed source files and processed shared source files. It allows to override the default path determination behavior, e.g. when multiple files exist as source files, while they should have the same target name, depending on a given file condition.
Example:
LICENSE.GPL-2.0.txt
andLICENSE.GPL-3.0.txt
exist.LICENSE.txt
in the resulting project.LICENSE.GPL-2.0.txt
will be processedLICENSE.GPL-3.0.txt
will be processedExample configuration: