[fix] update RPM.cmake and version upgrade script
This commit is contained in:
@ -88,3 +88,25 @@ upgrade_post_path="tools/upgrade/upgrade_post.py"
|
||||
upgrade_pre_path="tools/upgrade/upgrade_pre.py"
|
||||
sed -i s/admin/xxx/g $upgrade_post_path
|
||||
sed -i s/admin/xxx/g $upgrade_pre_path
|
||||
|
||||
# modify RPM.cmake version
|
||||
upgrade_rpm_cmake_path="cmake/RPM.cmake"
|
||||
cur_package_version_str="CPACK_PACKAGE_VERSION "$curr_version
|
||||
upd_package_version_str="CPACK_PACKAGE_VERSION "$dest_version
|
||||
major_old_num=`echo $curr_version | awk -F'.' '{print $1}'`
|
||||
minor_old_num=`echo $curr_version | awk -F'.' '{print $2}'`
|
||||
patch_old_num=`echo $curr_version | awk -F'.' '{print $3}'`
|
||||
major_new_num=`echo $dest_version | awk -F'.' '{print $1}'`
|
||||
minor_new_num=`echo $dest_version | awk -F'.' '{print $2}'`
|
||||
patch_new_num=`echo $dest_version | awk -F'.' '{print $3}'`
|
||||
cur_package_version_major_str="CPACK_PACKAGE_VERSION_MAJOR "$major_old_num
|
||||
upd_package_version_major_str="CPACK_PACKAGE_VERSION_MAJOR "$major_new_num
|
||||
cur_package_version_minor_str="CPACK_PACKAGE_VERSION_MINOR "$minor_old_num
|
||||
upd_package_version_minor_str="CPACK_PACKAGE_VERSION_MINOR "$minor_new_num
|
||||
cur_package_version_patch_str="CPACK_PACKAGE_VERSION_PATCH "$patch_old_num
|
||||
upd_package_version_patch_str="CPACK_PACKAGE_VERSION_PATCH "$patch_new_num
|
||||
sed -i s/"$cur_package_version_str"/"$upd_package_version_str"/g $upgrade_rpm_cmake_path
|
||||
sed -i s/"$cur_package_version_patch_str"/"$upd_package_version_patch_str"/g $upgrade_rpm_cmake_path
|
||||
sed -i s/"$cur_package_version_major_str"/"$upd_package_version_major_str"/g $upgrade_rpm_cmake_path
|
||||
sed -i s/"$cur_package_version_minor_str"/"$upd_package_version_minor_str"/g $upgrade_rpm_cmake_path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user