-
-
Notifications
You must be signed in to change notification settings - Fork 377
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: Support Reading Filter Expressions from a File #1411
Feature: Support Reading Filter Expressions from a File #1411
Conversation
d8e45a8
to
8830354
Compare
cab97a6
to
50d3676
Compare
excellent feature 👍 |
would this also fix #157 ? |
we should increase the coverage a bit... codecov/patch Failing after 1s — 60.49% of diff hit (target 75.09%) |
@5hir0kur0 please push the branch to the main aptly-dev/aptly git, then the coverage runs automatically. otherwise I need to do a separate coverage pr.. :) could you open the PR there ? |
the coverage test does not seem to cover all of the code, when it is invoked by the flag parsing. let's accept low coverage here... |
@neolynx Thanks for your work!
Sorry, I didn't check my GitHub over the weekend, but I'll do it like that next time I make a PR! |
Fixes #1409
Requirements
All new code should be covered with tests, documentation should be updated. CI should pass.
Description of the Change
As mentioned in the Issue, we have filter expressions that exceed the command line length limit and thus need to be read from a file/stdin. This PR extends the Aptly command-line interface to be able to read filter expressions from a file using the
@/path/to/file
syntax or@-
for stdin.Our use case is only for the
-filter
argument formirror create
/mirror edit
. However, there are other places in Aptly where filter expressions are accepted, so I added support for the@file
syntax everywhere for consistency.Commands where the
@file
syntax is supported now:mirror create
mirror edit
package search
package show
repo move
repo remove
snapshot filter
snapshot pull
snapshot search
Checklist
AUTHORS