mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
reworked cactus merge scripts
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
parent
5c71237045
commit
4d9b06d3bc
1 changed files with 103 additions and 86 deletions
|
|
@ -17,14 +17,16 @@ function bb_env()
|
||||||
{
|
{
|
||||||
BBDIR=$1
|
BBDIR=$1
|
||||||
shift
|
shift
|
||||||
|
local BASE
|
||||||
|
|
||||||
if [[ -z $BBDIR ]]; then
|
if [[ -z $BBDIR ]]; then
|
||||||
BASE=$BUILDBOT_PROJECT_PATH/main
|
BASE=$BUILDBOT_PROJECT_PATH/main-new/
|
||||||
else
|
else
|
||||||
BASE=$BBDIR
|
BASE=$BBDIR
|
||||||
fi
|
fi
|
||||||
export __PATHBKP=$PATH
|
#export __PATHBKP=$PATH
|
||||||
export PYTHONPATH=$BASE/buildbot/master:$BASE/txwebservices/install:$BASE/cactus/install:$BASE/config/tools
|
#export PYTHONPATH=$BASE/buildbot/master:$BASE/txwebservices/install:$BASE/cactus/install:$BASE/config/tools
|
||||||
export PATH=$HOME/bin:$BASE/buildbot/master/bin:$BASE/txwebservices/install:$PATH
|
#export PATH=$HOME/bin:$BASE/buildbot/master/bin:$BASE/txwebservices/install:$PATH
|
||||||
#export format_warnings_path=$BASE/config
|
#export format_warnings_path=$BASE/config
|
||||||
#export warning_path=$BASE/config/latests_warnings
|
#export warning_path=$BASE/config/latests_warnings
|
||||||
#export __PS1BKP=$PS1
|
#export __PS1BKP=$PS1
|
||||||
|
|
@ -52,6 +54,11 @@ alias autopep8_cur_directory='autopep8 --ignore=E501 -i **/*.py'
|
||||||
|
|
||||||
function bb_repo_upload()
|
function bb_repo_upload()
|
||||||
{
|
{
|
||||||
|
local REVIEWERS
|
||||||
|
local A
|
||||||
|
|
||||||
|
declare -a REVIEWERS
|
||||||
|
|
||||||
REVIEWERS=(ion.alberdi@intel.com\
|
REVIEWERS=(ion.alberdi@intel.com\
|
||||||
vincentx.besanceney@intel.com\
|
vincentx.besanceney@intel.com\
|
||||||
vincentx.dardel@intel.com\
|
vincentx.dardel@intel.com\
|
||||||
|
|
@ -67,20 +74,33 @@ function bb_repo_upload()
|
||||||
yes | repo upload --cbr --re=$A .
|
yes | repo upload --cbr --re=$A .
|
||||||
}
|
}
|
||||||
|
|
||||||
function bb_merge_staging_main()
|
function bb_merge_bottom_branch_to_here()
|
||||||
{
|
{
|
||||||
git merge umg/platform/buildbot/staging --m "Manual merge branch 'platform/buildbot/staging' into 'platform/buildbot/main'"
|
local branch
|
||||||
|
|
||||||
|
branch=$(git branches | grep "remotes/m/" | cut -d'/' -f5 | cut -d' ' -f1)
|
||||||
|
case $branch in
|
||||||
|
main)
|
||||||
|
bottom_branch="staging"
|
||||||
|
;;
|
||||||
|
staging)
|
||||||
|
bottom_branch="prod"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: unable to findout current branch!"
|
||||||
|
return 1
|
||||||
|
esac
|
||||||
|
echo "Merging branch $bottom_branch to $branch..."
|
||||||
|
git merge umg/platform/buildbot/$bottom_branch --m "Manual merge of branch 'platform/buildbot/$bottom_branch' into 'platform/buildbot/$branch'"
|
||||||
git mergetool --no-prompt --tool=kdiff3
|
git mergetool --no-prompt --tool=kdiff3
|
||||||
}
|
}
|
||||||
|
|
||||||
function bb_merge_prod_staging()
|
|
||||||
{
|
|
||||||
git merge umg/platform/buildbot/prod --m "Manual merge branch 'platform/buildbot/prod' into 'platform/buildbot/staging'"
|
|
||||||
git mergetool --no-prompt --tool=kdiff3
|
|
||||||
}
|
|
||||||
|
|
||||||
function bb_push_with_care()
|
function bb_push_with_care()
|
||||||
{
|
{
|
||||||
|
local branch
|
||||||
|
local project
|
||||||
|
|
||||||
branch=$(git branches | grep "remotes/m/" | cut -d'/' -f5 | cut -d' ' -f1)
|
branch=$(git branches | grep "remotes/m/" | cut -d'/' -f5 | cut -d' ' -f1)
|
||||||
project=$(git remote -v | grep umg | tail -n 1 | cut -d'/' -f6 | cut -d' ' -f1)
|
project=$(git remote -v | grep umg | tail -n 1 | cut -d'/' -f6 | cut -d' ' -f1)
|
||||||
|
|
||||||
|
|
@ -91,12 +111,7 @@ function bb_push_with_care()
|
||||||
echo "Pushing branch '$branch' on project '$project'"
|
echo "Pushing branch '$branch' on project '$project'"
|
||||||
echo "Press Enter to continue"
|
echo "Press Enter to continue"
|
||||||
read
|
read
|
||||||
git push ssh://android.intel.com/a/buildbot/$project HEAD:platform/buildbot/$branch
|
git push ssh://android.intel.com/a/buildbot/$project HEAD:refs/heads/platform/buildbot/$branch
|
||||||
# git push umg HEAD:platform/buildbot/$branch
|
|
||||||
# This requires to have the following configuration in git remote (ex for 'config' project):
|
|
||||||
# umg ssh://gerrit-glb.tl.intel.com/a/buildbot/config (fetch)
|
|
||||||
# umg ssh://gerrit-glb.tl.intel.com/a/buildbot/config (push)
|
|
||||||
#
|
|
||||||
|
|
||||||
echo "Refreshing repo"
|
echo "Refreshing repo"
|
||||||
echo "Waitin 30s..."
|
echo "Waitin 30s..."
|
||||||
|
|
@ -109,6 +124,7 @@ function bb_push_with_care()
|
||||||
|
|
||||||
function bb_start_slaves()
|
function bb_start_slaves()
|
||||||
{
|
{
|
||||||
|
local DIR
|
||||||
DIR=$(basename $PWD)
|
DIR=$(basename $PWD)
|
||||||
if [[ $DIR == "config" ]]; then
|
if [[ $DIR == "config" ]]; then
|
||||||
~/bin/buildslave start ~/data/buildbot-developer
|
~/bin/buildslave start ~/data/buildbot-developer
|
||||||
|
|
@ -120,6 +136,7 @@ function bb_start_slaves()
|
||||||
|
|
||||||
function bb_stop_slaves()
|
function bb_stop_slaves()
|
||||||
{
|
{
|
||||||
|
local DIR
|
||||||
DIR=$(basename $PWD)
|
DIR=$(basename $PWD)
|
||||||
if [[ $DIR == "config" ]]; then
|
if [[ $DIR == "config" ]]; then
|
||||||
~/bin/buildslave stop ~/data/buildbot-developer
|
~/bin/buildslave stop ~/data/buildbot-developer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue