diff options
-rw-r--r-- | lib/changelog.sh | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh index dedfa9a..c1b3748 100644 --- a/lib/changelog.sh +++ b/lib/changelog.sh @@ -22,16 +22,7 @@ _OB_CHANGELOG_SM='true' ob_use messages ob_use locale - -# Constant global parameters: -# FIXME: Remove. -OB_SOURCE_RE='^[a-z0-9][a-z0-9+.-]+$' -OB_SOURCE_VERSION_ID_RE='^' -OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'[0-9a-z.~]+' -OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'(\+sip[1-9][0-9]*)?' -OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'(-[1-9][0-9]*)?' -OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'(\+[a-z0-9]+-[1-9][0-9]*)?' -OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'$' +ob_use metadata OB_CHANGELOG_SOURCE= OB_CHANGELOG_VERSION= @@ -100,15 +91,11 @@ ${_obpch_line}" OB_CHANGELOG_DISTRIBUTION= OB_CHANGELOG_CHANGES= else - echo "${_obpch_source}" | \ - grep -E "${OB_SOURCE_RE}" >/dev/null 2>&1 - if [ ${?} -ne 0 ]; then + if ! ob_validate_source_name "${_obpch_source}"; then _ob_parse_changelog_error "${_obpch_line_nr}" \ 'changelog_bad_source' "${source}" fi - echo "${_obpch_version}" | \ - grep -E "${OB_SOURCE_VERSION_ID_RE}" >/dev/null 2>&1 - if [ ${?} -ne 0 ]; then + if ! ob_parse_version "${_obpch_version}"; then _ob_parse_changelog_error "${_obpch_line_nr}" \ 'changelog_bad_source_version' "${_obpch_version}" fi |