From 445fa7dd2c52258eb75b2755d0ab53252bf7b0c9 Mon Sep 17 00:00:00 2001 From: Robin-Charles GUIHENEUF Date: Wed, 21 Oct 2020 14:38:26 +0200 Subject: [PATCH] [skip ci] Save: do not merge --- .bash_aliases | 40 ++++++++++++++++++++++++---------------- navi/syncapi.cheat | 10 ++++++++++ 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index d33324d..9a12ae8 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -56,13 +56,11 @@ function s_clean { alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn" # Git -alias gst='git status' +alias gs='git status' alias gc='git checkout' alias gcm='git checkout master' alias gpl='git pull' alias gph='git push' -alias pull='git pull' -alias push='git push' alias gsu='git submodule update --init' alias add='git add' @@ -71,6 +69,10 @@ alias cont='git rebase --continue' alias branch_clean='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d' +alias git_parent='git show-branch | grep "\*" | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed "s/.*\[\(.*\)\].*/\1/" | sed "s/[\^~].*//"' + +alias log='git log --graph --decorate --oneline' + function branch_create { git checkout -b $1 git push -u origin $1 @@ -91,36 +93,42 @@ function tag_replace { git push origin $1 } -function grb { - git rebase -i HEAD~$1 -} - function g_save { git add * git commit -m "[skip ci] Save: do not merge" git push -f } -function grbm { - # Save actual branch +function grb { + git rebase -i HEAD~$1 +} + +function grbi { + # Save current branch BRANCH=$(git branch | grep \* | cut -d ' ' -f2) - # Checkout master & pull - git checkout master + # Save parent branch + PARENT=$(git_parent) + + # Checkout parent & pull + git checkout ${PARENT} git pull # Back to previous branch git checkout ${BRANCH} - git rebase -i master + git rebase -i ${PARENT} } -function grbr { +function grbroot { git rebase --interactive --autosquash --root } -function gam { - git autofixup master - git rebase --interactive --autosquash master +function gai { + # Save parent branch + PARENT=$(git_parent) + + git autofixup ${PARENT} + git rebase --interactive --autosquash ${PARENT} } function ga { diff --git a/navi/syncapi.cheat b/navi/syncapi.cheat index d437c96..c06a93f 100644 --- a/navi/syncapi.cheat +++ b/navi/syncapi.cheat @@ -9,9 +9,19 @@ # Debug parser Legrand /debug_parser.py --project legrand -s -c /legrand_.swp -r -pp -g +# Enable debug mode Legrand +/debug_config_setter.py --project legrand -s -c /legrand_.swp -g -t NLG -ke debug_enabled + +# Disable debug mode Legrand +/debug_config_setter.py --project legrand -s -c /legrand_.swp -g -t NLG -kd debug_enabled + +# Analyse diagnosis +/syncapiadmin.py --project legrand -s --endpoint getdebuginfo -c /legrand_.swp --mac | jq -r .body.diagnosis_content | /decode_diagnosis.py + # Paths $ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin" $ debug_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/debug" +$ release_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/release" # Variables $ server: echo "prod inte" | tr " " "\n"