Skip to content

Conversation

jordansissel
Copy link
Owner

For #1902 and #1827.

@hjpotter92
Copy link

hey, just following up on the PR's status. thanks for the fpm utility :)

@jordansissel
Copy link
Owner Author

@hjpotter92 I haven't worked much on this, but I Hope to resume soon :)

This option flag will cause fpm to load additional flags, in place, from
the given file.

For example, if a file "foo" contains one line, "--version 5.10", then
`fpm -s empty -t deb -n example --fpm-options-file foo` act as if
`--version 5.10` was given on the command-line in the same position as
the `--fpm-options-file` flag.

Error conditions checked:
* Has the file already been loaded?
* Does the file exist?
* Is the file readable?

No tests included at this time. This code is likely missing some edge
cases (combined single-letter flags, multiple flag entries on a line,
etc).
Cases:
* Option ordering (the flag operates in-place)
* Multiple --long-flags on a single line
* Multiple single flags on a single line (both like '-ff' and '-f -f')
* File self-reference errors
@jordansissel jordansissel marked this pull request as ready for review October 29, 2022 06:09
@jordansissel jordansissel merged commit cd7a685 into main Oct 29, 2022
@jordansissel
Copy link
Owner Author

@hjpotter92 Added some extra tests tonight on top of the previous work which was already pretty much complete! Merged :)

@jordansissel jordansissel changed the title Work-in-progress: Add new flag to allow reading additional options from a file. Add new flag to allow reading additional options from a file. Oct 29, 2022
@jordansissel jordansissel changed the title Add new flag to allow reading additional options from a file. Add new flag (--fpm-options-file) to allow reading additional options from a file. Oct 29, 2022
@jordansissel
Copy link
Owner Author

fpm 1.15.0 released with this new --fpm-options-file flag.

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

Successfully merging this pull request may close these issues.

2 participants