2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-03 03:50:08 +00:00

Fall back to the repository Version file when xCAT RPM is not installed

This commit is contained in:
Kilian Cavalotti 2022-08-26 09:12:17 -07:00
parent f5cc2631bf
commit 1508bff83c

View File

@ -1,5 +1,5 @@
%define version %(rpm -q xCAT --qf "%{VERSION}" 2>/dev/null)
Version: %{?version:%{version}}%{!?version:%(cat Version)}
%global version %(rpm -q xCAT --qf "%{VERSION}" 2>/dev/null | grep -Po '[0-9\.]+' || cat ../Version)
Version: %{version}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
%ifarch i386 i586 i686 x86
%define tarch x86