test:alter branch build

This commit is contained in:
happyguoxy 2025-01-17 14:58:40 +08:00
parent c37a96a916
commit 345fb9cecc
1 changed files with 18 additions and 18 deletions

View File

@ -118,14 +118,14 @@ function buildTDengine() {
# pull tdinternal code
cd "$TDENGINE_DIR/../"
print_color "$GREEN" "Git pull TDinternal code..."
git remote prune origin > /dev/null
git remote update > /dev/null
# git remote prune origin > /dev/null
# git remote update > /dev/null
# pull tdengine code
cd $TDENGINE_DIR
print_color "$GREEN" "Git pull TDengine code..."
git remote prune origin > /dev/null
git remote update > /dev/null
# git remote prune origin > /dev/null
# git remote update > /dev/null
REMOTE_COMMIT=`git rev-parse --short remotes/origin/$branch`
LOCAL_COMMIT=`git rev-parse --short @`
print_color "$GREEN" " LOCAL: $LOCAL_COMMIT"
@ -137,12 +137,12 @@ function buildTDengine() {
print_color "$GREEN" "Repo need to pull"
fi
git reset --hard
git checkout -- .
# git reset --hard
# git checkout -- .
git checkout $branch
git checkout -- .
git clean -f
git pull
# git checkout -- .
# git clean -f
# git pull
[ -d $TDENGINE_DIR/../debug ] || mkdir $TDENGINE_DIR/../debug
cd $TDENGINE_DIR/../debug
@ -155,15 +155,15 @@ function buildTDengine() {
print_color "$GREEN" "$makecmd"
$makecmd
make -j 8 install
make -j $(nproc) install
else
TDENGINE_DIR="$PROJECT_DIR"
# pull tdengine code
cd $TDENGINE_DIR
print_color "$GREEN" "Git pull TDengine code..."
git remote prune origin > /dev/null
git remote update > /dev/null
# git remote prune origin > /dev/null
# git remote update > /dev/null
REMOTE_COMMIT=`git rev-parse --short remotes/origin/$branch`
LOCAL_COMMIT=`git rev-parse --short @`
print_color "$GREEN" " LOCAL: $LOCAL_COMMIT"
@ -175,12 +175,12 @@ function buildTDengine() {
print_color "$GREEN" "Repo need to pull"
fi
git reset --hard
git checkout -- .
# git reset --hard
# git checkout -- .
git checkout $branch
git checkout -- .
git clean -f
git pull
# git checkout -- .
# git clean -f
# git pull
[ -d $TDENGINE_DIR/debug ] || mkdir $TDENGINE_DIR/debug
cd $TDENGINE_DIR/debug
@ -193,7 +193,7 @@ function buildTDengine() {
print_color "$GREEN" "$makecmd"
$makecmd
make -j 8 install
make -j $(nproc) install
fi
print_color "$GREEN" "TDengine build end"