From 193ed9fd4e4345b96d2d3c6662cc59d789b5a433 Mon Sep 17 00:00:00 2001 From: wujing Date: Tue, 16 Nov 2021 15:29:02 +0800 Subject: [PATCH] remove build platform restrictions Signed-off-by: wujing --- lcr.spec | 9 +++++++-- update-version.bash => update-version.sh | 21 +++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) rename update-version.bash => update-version.sh (79%) diff --git a/lcr.spec b/lcr.spec index cb9db32..8707f0b 100644 --- a/lcr.spec +++ b/lcr.spec @@ -1,5 +1,5 @@ %global _version 2.0.6 -%global _release 2 +%global _release 3 %global _inner_name isula_libutils Name: lcr @@ -22,7 +22,6 @@ BuildRequires: lxc >= %{lxcver} BuildRequires: lxc-devel >= %{lxcver} BuildRequires: zlib-devel yajl-devel gtest-devel Requires: lxc >= %{lxcver} yajl zlib -ExclusiveArch: x86_64 aarch64 %ifarch x86_64 Provides: liblcr.so()(64bit) @@ -103,6 +102,12 @@ rm -rf %{buildroot} %{_includedir}/%{_inner_name}/*.h %changelog +* Tue Nov 16 2021 wujing - 2.0.6-3 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: remove build platform restrictions + * Thu Nov 09 2021 gaohuatao - 2.0.6-2 - Type:enhancement - ID:NA diff --git a/update-version.bash b/update-version.sh similarity index 79% rename from update-version.bash rename to update-version.sh index 76697b8..2ad5663 100755 --- a/update-version.bash +++ b/update-version.sh @@ -1,3 +1,7 @@ +#!/bin/bash +# +# usage +# ./update-version.sh ####################################################################### # lcr: utils library for iSula # @@ -21,18 +25,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ####################################################################### -#!/bin/bash -# -# usage -# ./update-version.bash topDir=$(git rev-parse --show-toplevel) specfile="${topDir}/lcr.spec" -CMakefile="${topDir}/CMakeLists.txt" old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'}) first_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $1'}) second_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $2'}) third_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $3'}) -read -p "Which level version do you want to upgrade?[1/2/3/d/N](default:N) select:" choice +read -p "Which level version do you want to upgrade?[1/2/3/r/N](default:N) select:" choice if [[ ! -n "${choice}" || ${choice} == "N" ]]; then echo "The version number has not been modified, it is still ${old_version}" exit 0 @@ -51,15 +50,9 @@ fi new_version=${first_old_version}.${second_old_version}.${third_old_version} -echo "The version number has been modified: ${old_version} => ${new_version}" - old_release=$(cat ${specfile} | grep "%global" | grep "_release" | awk {'print $3'}) -commit_id_long=`git log --pretty=oneline -1 | awk {'print $1'}` -commit_id=${commit_id_long:0:8} -new_release=`date "+%Y%m%d"`.`date "+%H%M%S"`.git$commit_id -echo "The relase version has been modified, it is ${new_release}" -sed -i "s/set(LCR_VERSION \"${old_version}\")/set(LCR_VERSION \"${new_version}\")/g" ${CMakefile} +new_release=$(($old_release+1)) sed -i "s/^\%global _version ${old_version}$/\%global _version ${new_version}/g" ${specfile} sed -i "s/^\%global _release ${old_release}$/\%global _release ${new_release}/g" ${specfile} -echo "The release number has been modified: ${old_release} => ${new_release}" +echo "The release version has been modified: ${old_version}-${old_release} => ${new_version}-${new_release}"