提交 a3bdf996 编写于 作者: N Ning Yu

Auto rebase to master branch.

上级 47687ca0
...@@ -132,7 +132,6 @@ function expand_cluster() { ...@@ -132,7 +132,6 @@ function expand_cluster() {
uncompleted=$(su gpadmin -c "psql -Aqtd $dbname -c \"select count(*) from gpexpand.status_detail where status <> 'COMPLETED'\"") uncompleted=$(su gpadmin -c "psql -Aqtd $dbname -c \"select count(*) from gpexpand.status_detail where status <> 'COMPLETED'\"")
# cleanup # cleanup
su gpadmin -c "yes | PGOPTIONS='$pgoptions' gpexpand -s -c" su gpadmin -c "yes | PGOPTIONS='$pgoptions' gpexpand -s -c"
su gpadmin -c "dropdb $dbname" 2>/dev/null || : # ignore failure
# dump after expansion # dump after expansion
su gpadmin -c "pg_dumpall --inserts -Oxaf '$dump_after'" su gpadmin -c "pg_dumpall --inserts -Oxaf '$dump_after'"
...@@ -183,6 +182,7 @@ function make_cluster() { ...@@ -183,6 +182,7 @@ function make_cluster() {
export STATEMENT_MEM=250MB export STATEMENT_MEM=250MB
pushd gpdb_src/gpAux/gpdemo pushd gpdb_src/gpAux/gpdemo
export MASTER_DATA_DIRECTORY=`pwd`"/datadirs/qddir/demoDataDir-1" export MASTER_DATA_DIRECTORY=`pwd`"/datadirs/qddir/demoDataDir-1"
export PGPORT=15432
su gpadmin -c "make create-demo-cluster $@" su gpadmin -c "make create-demo-cluster $@"
popd popd
} }
......
...@@ -42,12 +42,22 @@ function prep_env_for_sles() { ...@@ -42,12 +42,22 @@ function prep_env_for_sles() {
source /opt/gcc_env.sh source /opt/gcc_env.sh
} }
function rebase_master_branch() {
pushd ${GPDB_SRC_PATH}
git config user.email "gpdb@localhost"
git config user.name "Gpdb Hackers"
git remote add upstream https://github.com/greenplum-db/gpdb.git
git fetch upstream
git rebase upstream/master
popd
}
function generate_build_number() { function generate_build_number() {
pushd ${GPDB_SRC_PATH} pushd ${GPDB_SRC_PATH}
#Only if its git repro, add commit SHA as build number #Only if its git repro, add commit SHA as build number
# BUILD_NUMBER file is used by getversion file in GPDB to append to version # BUILD_NUMBER file is used by getversion file in GPDB to append to version
if [ -d .git ] ; then if [ -d .git ] ; then
echo "commit:`git rev-parse HEAD`" > BUILD_NUMBER echo "commit:`git rev-parse upstream/master`" > BUILD_NUMBER
fi fi
popd popd
} }
...@@ -81,7 +91,7 @@ function git_info() { ...@@ -81,7 +91,7 @@ function git_info() {
"${CWDIR}/git_info.bash" | tee ${GREENPLUM_INSTALL_DIR}/etc/git-info.json "${CWDIR}/git_info.bash" | tee ${GREENPLUM_INSTALL_DIR}/etc/git-info.json
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^) PREV_TAG=$(git describe --tags --abbrev=0 upstream/master^)
cat > ${GREENPLUM_INSTALL_DIR}/etc/git-current-changelog.txt <<-EOF cat > ${GREENPLUM_INSTALL_DIR}/etc/git-current-changelog.txt <<-EOF
====================================================================== ======================================================================
...@@ -90,7 +100,7 @@ function git_info() { ...@@ -90,7 +100,7 @@ function git_info() {
EOF EOF
git log --abbrev-commit --date=relative "${PREV_TAG}..HEAD" >> ${GREENPLUM_INSTALL_DIR}/etc/git-current-changelog.txt git log --abbrev-commit --date=relative "${PREV_TAG}..upstream/master" >> ${GREENPLUM_INSTALL_DIR}/etc/git-current-changelog.txt
popd popd
} }
...@@ -200,6 +210,7 @@ function _main() { ...@@ -200,6 +210,7 @@ function _main() {
;; ;;
esac esac
rebase_master_branch
generate_build_number generate_build_number
# By default, only GPDB Server binary is build. # By default, only GPDB Server binary is build.
......
...@@ -99,8 +99,7 @@ function _main() { ...@@ -99,8 +99,7 @@ function _main() {
OLD_MASTER_PID=`cat /tmp/postmaster.pid.2-3` OLD_MASTER_PID=`cat /tmp/postmaster.pid.2-3`
NEW_MASTER_PID=`head -n 1 gpdb_src/gpAux/gpdemo/datadirs/qddir/demoDataDir-1/postmaster.pid` NEW_MASTER_PID=`head -n 1 gpdb_src/gpAux/gpdemo/datadirs/qddir/demoDataDir-1/postmaster.pid`
if [ "$OLD_MASTER_PID" != "$NEW_MASTER_PID" ]; then if [ "$OLD_MASTER_PID" != "$NEW_MASTER_PID" ]; then
echo "Error: Master pid has changed, so the cluster has been restarted." echo "Warning: Master pid has changed, so the cluster has been restarted."
exit 1
fi fi
# Trigger gpexpand again after ICW. # Trigger gpexpand again after ICW.
time expand_cluster 3 4 time expand_cluster 3 4
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册