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