Skip to content

Commit

Permalink
Merge pull request openshift#14438 from jim-minter/git_version
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Jun 8, 2017
2 parents ba62cde + 9449f60 commit 7baa51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/lib/build/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function os::build::rpm::get_nvra_vars() {
if [[ "${metadata:0:1}" == "+" ]]; then
# we only have build metadata, but need to massage it so
# we can generate a valid RPM release from it
if [[ "${metadata}" =~ ^\+([a-z0-9]{7})(-([0-9]+))?(-dirty)?$ ]]; then
if [[ "${metadata}" =~ ^\+([a-z0-9]{7,40})(-([0-9]+))?(-dirty)?$ ]]; then
build_sha="${BASH_REMATCH[1]}"
build_num="${BASH_REMATCH[3]:-0}"
else
Expand All @@ -54,7 +54,7 @@ function os::build::rpm::get_nvra_vars() {
OS_RPM_RELEASE="1.${build_num}.${build_sha}"
elif [[ "${metadata:0:1}" == "-" ]]; then
# we have both build metadata and pre-release info
if [[ "${metadata}" =~ ^-([^\+]+)\+([a-z0-9]{7})(-([0-9]+))?(-dirty)?$ ]]; then
if [[ "${metadata}" =~ ^-([^\+]+)\+([a-z0-9]{7,40})(-([0-9]+))?(-dirty)?$ ]]; then
pre_release="${BASH_REMATCH[1]}"
build_sha="${BASH_REMATCH[2]}"
build_num="${BASH_REMATCH[4]:-0}"
Expand Down

0 comments on commit 7baa51d

Please sign in to comment.