Skip to content

Commit

Permalink
Merge pull request #2495 from pacevedom/USHIFT-1778
Browse files Browse the repository at this point in the history
USHIFT-1778: Fix rpm spec version comparison
  • Loading branch information
openshift-ci[bot] authored Oct 20, 2023
2 parents 3e250f3 + 5c28c85 commit 85bcc47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packaging/rpm/microshift.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
}

# golang specifics
%global golang_version 1.20.3
# Needs to match go.mod go directive
%global golang_version 1.20
#debuginfo not supported with Go
%global debug_package %{nil}
# modifying the Go binaries breaks the DWARF debugging
Expand Down Expand Up @@ -127,7 +128,7 @@ The microshift-greenboot package provides the Greenboot scripts used for verifyi

%prep
# Dynamic detection of the available golang version also works for non-RPM golang packages
golang_detected=$(go version | awk '{print $3}' | tr -d '[a-z]')
golang_detected=$(go version | awk '{print $3}' | tr -d '[a-z]' | cut -f1-2 -d.)
golang_required=%{golang_version}
if [[ "${golang_detected}" < "${golang_required}" ]] ; then
echo "The detected go version ${golang_detected} is less than the required version ${golang_required}" > /dev/stderr
Expand Down

0 comments on commit 85bcc47

Please sign in to comment.