fpm_versioning Module

Implementation of versioning data for comparing packages


Uses


Interfaces

public interface new_version

  • private subroutine new_version_from_string(self, string, error)

    Create a new version from a string

    Arguments

    Type IntentOptional Attributes Name
    type(version_t), intent(out) :: self

    Instance of the versioning data

    character(len=*), intent(in) :: string

    String describing the version information

    type(error_t), intent(out), allocatable :: error

    Error handling

  • private subroutine new_version_from_int(self, num)

    Create a new version from a string

    Arguments

    Type IntentOptional Attributes Name
    type(version_t), intent(out) :: self

    Instance of the versioning data

    integer, intent(in) :: num(:)

    Subversion numbers to define version data


Derived Types

type, public ::  version_t

Type-Bound Procedures

generic, public :: operator(.match.) => match ../../

Compare a version against a version constraint (x.x.0 <= v < x.x.HUGE)

generic, public :: operator(/=) => not_equals
generic, public :: operator(<) => less
generic, public :: operator(<=) => less_equals
generic, public :: operator(==) => equals
generic, public :: operator(>) => greater
generic, public :: operator(>=) => greater_equals
procedure, public :: s ../../

Create a printable string from a version data type


Functions

public function regex_version_from_text(text, what, error) result(ver)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text
character(len=*), intent(in) :: what
type(error_t), intent(out), allocatable :: error

Return Value type(string_t)