Skip to content
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

[File] add line matcher to File resource #167

Merged
merged 13 commits into from
Feb 1, 2021
Merged

[File] add line matcher to File resource #167

merged 13 commits into from
Feb 1, 2021

Conversation

olblak
Copy link
Member

@olblak olblak commented Jan 30, 2021

Add parameter "line" to identify a specific line.
It behaves differently depending on the stage

source
Return the first list that contain the string

condition
Return true for the first line that match the string

target
Update file based on the first line returned from string

Signed-off-by: Olivier Vernin olivier@vernin.me

Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak added the enhancement New feature or request label Jan 31, 2021
@olblak
Copy link
Member Author

olblak commented Jan 31, 2021

I am starting to wonder if it's the proper place to put this.
Maybe it's better to add transformer rule to #160 to include a line, includeOnly, and exclude lines

Like

transformers:
    - line:
        includeOnly: "arm64" # Only takes the line containing the string "arm64"
transformers:
    - line:
        exclude: 
           - "arm64" # Exclude the line containing the string "arm64"
           - "amd64" # Also exclude the line containing the string "amd64"

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak
Copy link
Member Author

olblak commented Feb 1, 2021

Rename:

  • IncludesOnly by Include
  • Include by "HasIncludes"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant