lib/release_tools/deployments/deployment_version_parser.rb
# Parses the supplied version into a `DeploymentVersion`, which contains:
#
# * The deployed SHA
# * The deployed branch or tag name
# * A boolean indicating if a tag was deployed instead of a branch
#
# This method will raise an ArgumentError if the version could not be
# parsed.
Parses the supplied version into a `DeploymentVersion`, which contains:
The deployed SHA
The deployed branch or tag name
A boolean indicating if a tag was deployed instead of a branch

This method will raise an ArgumentError if the version could not be
parsed.
Parses the supplied version into a ` DeploymentVersion ` which contains : The deployed SHA The deployed branch or tag name A boolean indicating if a tag was deployed instead of a branch This method will raise an ArgumentError if the version could not be parsed .
def parse(version)
        if (parsed = deployment_from_version(version))
          return parsed
        end
        if (parsed = deployment_from_tag(version))
          return parsed
        end
        raise(ArgumentError, "Failed to extract deploy details from #{version}")
      end
def parse ( version ) if ( parsed = deployment_from_version ( version ) ) return parsed end if ( parsed = deployment_from_tag ( version ) ) return parsed end raise ( ArgumentError , "Failed to extract deploy details from #{version}" ) end
Parses the supplied version into a `DeploymentVersion`, which contains:
 The deployed SHA
 The deployed branch or tag name
 A boolean indicating if a tag was deployed instead of a branch
Parses the supplied version into a ` DeploymentVersion ` which contains : The deployed SHA The deployed branch or tag name A boolean indicating if a tag was deployed instead of a branch
version