Add "package_name_format" field to recipe#215
Open
bernd wants to merge 5 commits into
Open
Conversation
Adjust the Package::Version class to handle an epoch that is set in the version string and as recipe field. An epoch in the version string has precedence over the recipe field for backward compatibility. If the epoch is set in both, the version string and the epoch field, we throw an exception because we cannot select on value automatically. Refs #210
Setting the field to a format string value changes the filename of the created package. If unset, FPM chooses its default format. See the following code section for available format strings: https://github.com/jordansissel/fpm/blob/c40f6818f88a6dd3df7bc19b6007b03a716949f8/lib/fpm/package.rb#L355-L365 Fixes #210
- Add "before_package_file_create" - Add "after_package_file_create" - Deprecate "before_package_create" - Deprecate "after_package_create" The new hooks take the package filename as first parameter. With the introduction of the package_name_format recipe field, the package filename cannot be computed with the FPM::Package object alone anymore. We now pass in the filename directly so consumers don't have to compute the filename anymore. We could have passed in the recipe object or the package name format so consumers could compute the filename based on that, but that would require deeper knowledge of the FPM::Package object.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Setting the field to a format string value changes the filename of the
created package. If unset, FPM chooses its default format.
See the following code section for available format strings:
https://github.com/jordansissel/fpm/blob/c40f6818f88a6dd3df7bc19b6007b03a716949f8/lib/fpm/package.rb#L355-L365
Fixes #210
Example recipe: