Skip to content

Commit 72e2ab6

Browse files
committed
Ensure to return the right release version
Fow now, if we build Cloudberry from a source zip file (not using git clone), the version information displayed is not matched the right info, always return 1.0.0 like this: ``` PostgreSQL 14.4 (Apache Cloudberry 1.0.0 build dev) ``` In this PR, these changes are made: - Update the PACKAGE_VERSION string from 1.0.0 to 2.0.0devel, which is similar to the way PostgreSQL is using. - Generate the new configure file with the new configure.ac - Update the getversion file to take the PACKAGE_VERSION as the base version info, and append `+dev.<count>.g<sha>` whenever possible unless the current commit is exactly on a tag. After these changes, will return the right info no matter how they get the source code, like git-clone, source tarballs. For each release, we also need to update the version string to match the right release version manually in each branch. See: http://github.com/apache/cloudberry/discussions/909
1 parent 49d49b8 commit 72e2ab6

4 files changed

Lines changed: 22 additions & 20 deletions

File tree

configure

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for Apache Cloudberry 1.0.0.
3+
# Generated by GNU Autoconf 2.69 for Apache Cloudberry 2.0.0devel.
44
#
55
# Report bugs to <dev@cloudberry.apache.org>.
66
#
@@ -570,6 +570,7 @@ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
570570
#
571571
# Initializations.
572572
#
573+
ac_default_prefix=/usr/local
573574
ac_clean_files=
574575
ac_config_libobj_dir=.
575576
LIBOBJS=
@@ -581,8 +582,8 @@ MAKEFLAGS=
581582
# Identity of this package.
582583
PACKAGE_NAME='Apache Cloudberry'
583584
PACKAGE_TARNAME='apache-cloudberry'
584-
PACKAGE_VERSION='1.0.0'
585-
PACKAGE_STRING='Apache Cloudberry 1.0.0'
585+
PACKAGE_VERSION='2.0.0devel'
586+
PACKAGE_STRING='Apache Cloudberry 2.0.0devel'
586587
PACKAGE_BUGREPORT='dev@cloudberry.apache.org'
587588
PACKAGE_URL='https://cloudberry.apache.org/'
588589

@@ -758,8 +759,8 @@ HAVE_CXX14
758759
enable_gpcloud
759760
enable_shared_postgres_backend
760761
enable_mapreduce
761-
enable_catalog_ext
762762
enable_serverless
763+
enable_catalog_ext
763764
enable_orca
764765
autodepend
765766
PKG_CONFIG_LIBDIR
@@ -1510,7 +1511,7 @@ if test "$ac_init_help" = "long"; then
15101511
# Omit some internal or obsolete options to make the list less imposing.
15111512
# This message is too long to be a string in the A/UX 3.1 sh.
15121513
cat <<_ACEOF
1513-
\`configure' configures Apache Cloudberry 1.0.0 to adapt to many kinds of systems.
1514+
\`configure' configures Apache Cloudberry 2.0.0devel to adapt to many kinds of systems.
15141515

15151516
Usage: $0 [OPTION]... [VAR=VALUE]...
15161517

@@ -1576,7 +1577,7 @@ fi
15761577

15771578
if test -n "$ac_init_help"; then
15781579
case $ac_init_help in
1579-
short | recursive ) echo "Configuration of Apache Cloudberry 1.0.0:";;
1580+
short | recursive ) echo "Configuration of Apache Cloudberry 2.0.0devel:";;
15801581
esac
15811582
cat <<\_ACEOF
15821583

@@ -1606,7 +1607,7 @@ Optional Features:
16061607
--enable-cassert enable assertion checks (for debugging)
16071608
--disable-orca disable ORCA optimizer
16081609
--enable-catalog-ext enable Cloudberry catalog extension
1609-
--enable-serverless enable Cloudberry serverless mode
1610+
--enable-serverless use serverless mode of Cloudberry
16101611
--enable-mapreduce enable Cloudberry Mapreduce support
16111612
--disable-shared-postgres-backend
16121613
enable Cloudberry shared postgres backend support
@@ -1778,7 +1779,7 @@ fi
17781779
test -n "$ac_init_help" && exit $ac_status
17791780
if $ac_init_version; then
17801781
cat <<\_ACEOF
1781-
Apache Cloudberry configure 1.0.0
1782+
Apache Cloudberry configure 2.0.0devel
17821783
generated by GNU Autoconf 2.69
17831784

17841785
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2531,7 +2532,7 @@ cat >config.log <<_ACEOF
25312532
This file contains any messages produced by compilers while
25322533
running configure, to aid debugging if configure makes a mistake.
25332534

2534-
It was created by Apache Cloudberry $as_me 1.0.0, which was
2535+
It was created by Apache Cloudberry $as_me 2.0.0devel, which was
25352536
generated by GNU Autoconf 2.69. Invocation command line was
25362537

25372538
$ $0 $@
@@ -8377,7 +8378,7 @@ $as_echo "checking whether to build with catalog extension... $enable_catalog_ex
83778378

83788379

83798380
#
8380-
# Enable serverless mode
8381+
# --enable-serverless uses serverless mode of Cloudberry
83818382
#
83828383

83838384

@@ -8404,8 +8405,8 @@ else
84048405
fi
84058406

84068407

8407-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: checking whether to use serverless architecture of Cloudberry ... $enable_serverless" >&5
8408-
$as_echo "checking whether to use serverless architecture of Cloudberry ... $enable_serverless" >&6; }
8408+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: checking whether to use serverless mode of Cloudberry... $enable_serverless" >&5
8409+
$as_echo "checking whether to use serverless mode of Cloudberry... $enable_serverless" >&6; }
84098410

84108411

84118412
#
@@ -23298,7 +23299,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2329823299
# report actual input values of CONFIG_FILES etc. instead of their
2329923300
# values after options handling.
2330023301
ac_log="
23301-
This file was extended by Apache Cloudberry $as_me 1.0.0, which was
23302+
This file was extended by Apache Cloudberry $as_me 2.0.0devel, which was
2330223303
generated by GNU Autoconf 2.69. Invocation command line was
2330323304

2330423305
CONFIG_FILES = $CONFIG_FILES
@@ -23369,7 +23370,7 @@ _ACEOF
2336923370
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2337023371
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2337123372
ac_cs_version="\\
23372-
Apache Cloudberry config.status 1.0.0
23373+
Apache Cloudberry config.status 2.0.0devel
2337323374
configured by $0, generated by GNU Autoconf 2.69,
2337423375
with options \\"\$ac_cs_config\\"
2337523376

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
2020
dnl The PACKAGE_VERSION from upstream PostgreSQL is maintained in the
2121
dnl PG_PACKAGE_VERSION variable, when merging make sure to update this
2222
dnl variable with the merge conflict from the AC_INIT() statement.
23-
AC_INIT([Apache Cloudberry], [1.0.0], [dev@cloudberry.apache.org], [], [https://cloudberry.apache.org/])
23+
AC_INIT([Apache Cloudberry], [2.0.0devel], [dev@cloudberry.apache.org], [], [https://cloudberry.apache.org/])
2424
[PG_PACKAGE_VERSION=14.4]
2525
AC_SUBST(PG_PACKAGE_VERSION)
2626

getversion

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ if type git >/dev/null 2>&1 && [ -d '.git' ] ; then
2323
# overwrite the VERSION from autoconf with the output, else append
2424
# HEAD commit info
2525
if git describe >/dev/null 2>&1 ; then
26-
VERSION=$(generate_dev_version)
27-
else
28-
VERSION+=+
29-
VERSION+=$(git rev-parse --short HEAD)
26+
GIT_VERSION=$(generate_dev_version)
27+
# Append commit distance and SHA if not on a tag
28+
if ! git describe --exact-match >/dev/null 2>&1; then
29+
VERSION+=\+$(echo "$GIT_VERSION" | cut -d'+' -f2-)
30+
fi
3031
fi
3132
# If not a git repository and VERSION file exists, use version string from file.
3233
elif [[ -s ./VERSION ]]; then

gpMgmt/bin/gppylib/gpversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
% os.path.split(__file__)[-1])
1919
sys.exit(1)
2020

21-
MAIN_VERSION = [1,99] # version number for main
21+
MAIN_VERSION = [2,99] # version number for main
2222

2323

2424
#============================================================

0 commit comments

Comments
 (0)