diff --git a/package/debian/build-deb.sh b/package/debian/build-deb.sh index 37fa64026c7..89e0ad3f750 100755 --- a/package/debian/build-deb.sh +++ b/package/debian/build-deb.sh @@ -25,7 +25,7 @@ code_commit=$(git rev-parse HEAD || echo unknown) code_branch=$(git rev-parse --abbrev-ref HEAD || echo unknown) polar_commit=$(git rev-parse --short=8 HEAD || echo unknown) pg_version=$(grep AC_INIT ../../configure.in | awk -F'[][]' '{print $4}') -polar_majorversion=2.0.$(echo ${pg_version}) +polar_majorversion=$(echo ${pg_version}) polar_minorversion=$(grep -A 1 '&polar_version' ../../src/backend/utils/misc/guc.c | awk 'NR==2{print}' | awk -F'[."]' '{print $4}').0 polar_release_date=$(grep -A 1 '&polar_release_date' ../../src/backend/utils/misc/guc.c | awk 'NR==2{print}' | awk -F'[,"]' '{print $2}') polar_version=${polar_majorversion}.${polar_minorversion} diff --git a/package/rpm/PolarDB.spec b/package/rpm/PolarDB.spec index 5fcf9a47f4e..762289daf52 100644 --- a/package/rpm/PolarDB.spec +++ b/package/rpm/PolarDB.spec @@ -25,7 +25,7 @@ %define code_branch %(git rev-parse --abbrev-ref HEAD || echo unknown) %define polar_commit %(git rev-parse --short=8 HEAD || echo unknown) %define pg_version %(grep AC_INIT ../../configure.in | awk -F'[][]' '{print $4}') -%define polar_majorversion 2.0.%{pg_version} +%define polar_majorversion %{pg_version} %define polar_minorversion %(grep -A 1 '&polar_version' ../../src/backend/utils/misc/guc.c | awk 'NR==2{print}' | awk -F'[."]' '{print $4}').0 %define polar_release_date %(grep -A 1 '&polar_release_date' ../../src/backend/utils/misc/guc.c | awk 'NR==2{print}' | awk -F'[,"]' '{print $2}') %define polar_version %{polar_majorversion}.%{polar_minorversion}