File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ distname=$(grep '^ID=' /etc/os-release | awk -F'=' '{print $2}')
3737distversion=$( grep ' VERSION_ID=' /etc/os-release | awk -F\" ' {print $2}' )
3838arch=$( dpkg --print-architecture)
3939
40- pkgname=${package} _${polar_pg_version } -${build_date } -${distname}${distversion} _${arch}
40+ pkgname=${package} _${polar_version } -${polar_commit } -${distname}${distversion} _${arch}
4141rm -rf ./${pkgname}
4242mkdir -p ${pkgname} /DEBIAN
4343
4444cat ./control >> ${pkgname} /DEBIAN/control
45- echo ' Version: ' ${polar_pg_version } ' -' ${build_date } ' ' >> ${pkgname} /DEBIAN/control
45+ echo ' Version: ' ${polar_version } ' -' ${polar_commit } ' ' >> ${pkgname} /DEBIAN/control
4646echo ' Architecture: ' ${arch} ' ' >> ${pkgname} /DEBIAN/control
4747
4848prefix=/u01/polardb_pg
Original file line number Diff line number Diff line change 2525%define code_branch %(git rev-parse --abbrev-ref HEAD || echo unknown)
2626%define polar_commit %(git rev-parse --short= 8 HEAD || echo unknown)
2727%define pg_version %(grep AC_INIT ../../configure.in | awk -F'[][]' '{print $4}')
28- %define polar_majorversion 2.0.%(echo % pg_version | awk -F'[^0-9]+' '{print $1}')
28+ %define polar_majorversion 2.0.%{ pg_version }
2929%define polar_minorversion %(grep -A 1 '&polar_version' ../../src/backend/utils/misc/guc.c | awk 'NR== 2{print}' | awk -F'[."]' '{print $4}').0
3030%define polar_release_date %(grep -A 1 '&polar_release_date' ../../src/backend/utils/misc/guc.c | awk 'NR== 2{print}' | awk -F'[,"]' '{print $2}')
3131%define polar_version %{polar_majorversion }.%{polar_minorversion }
3232%define polar_pg_version %{pg_version }.%{polar_minorversion }
3333%define _build_id_links none
3434%define __spec_install_pre /bin/true
3535
36- Version: %{polar_pg_version }
37- Release: %{build_date }%{?dist }
36+ Version: %{polar_version }
37+ Release: %{polar_commit }%{?dist }
3838Summary: PolarDB
3939Name: PolarDB
4040Group: alibaba/application
You can’t perform that action at this time.
0 commit comments