#!/bin/bash

echo "loading..."

cd /www/dev/api/testproject

#没有提交的修改暂存到stash里面
git stash

curr_branch=$(git symbolic-ref --short -q HEAD)
pub_branch="dev-common"

if [ ${curr_branch} != ${pub_branch} ]; then
   git checkout ${pub_branch} 
fi

git pull

#php /www/dev/api/testproject/init --env=Development --overwrite=all


#projectArr=("testproject1" "testproject2")
#pub_branch="build-dev"

#for project in ${projectArr[@]}
#do
#    echo "....................loading $project...................."
#    cd /www/$project
#
#    curr_branch=$(git symbolic-ref --short -q HEAD)
#
#    if [ ${curr_branch} != ${pub_branch} ]; then
#        git checkout ${pub_branch}
#    fi

#    git pull
#done

 

相关文章:

  • 2022-12-23
  • 2022-03-01
  • 2021-08-14
  • 2021-12-18
  • 2021-09-21
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2022-02-11
  • 2021-06-10
  • 2022-12-23
相关资源
相似解决方案