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

Add "package_name_format" field to recipe #215

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Commits on Jul 13, 2022

  1. Add "epoch" field to the recipe class

    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
    bernd committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    deb1df8 View commit details
    Browse the repository at this point in the history
  2. Add package_name_format field to recipe

    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
    bernd committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    dac4928 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f13d4c View commit details
    Browse the repository at this point in the history
  4. Introduce two new package file creation lifecycle hooks

    - 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.
    bernd committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    920edbc View commit details
    Browse the repository at this point in the history