Compare commits

...

1 Commits

Author SHA1 Message Date
Robin-Charles GUIHENEUF
1614f5757a [skip ci] Save: do not merge 2020-10-21 16:06:17 +02:00
2 changed files with 41 additions and 18 deletions

View File

@ -56,14 +56,13 @@ function s_clean {
alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn" alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn"
# Git # Git
alias gst='git status' alias gs='git status'
alias gc='git checkout' alias gc='git checkout'
alias gcm='git checkout master' alias gcm='git checkout master'
alias gpl='git pull' alias gpl='git pull'
alias gph='git push' alias gph='git push'
alias pull='git pull'
alias push='git push'
alias gsu='git submodule update --init' alias gsu='git submodule update --init'
alias gcp='git cherry-pick'
alias add='git add' alias add='git add'
alias commit='git commit -m "To fixup"' alias commit='git commit -m "To fixup"'
@ -71,6 +70,10 @@ alias cont='git rebase --continue'
alias branch_clean='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d' 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/"'
alias log='git log --graph --decorate --oneline'
function branch_create { function branch_create {
git checkout -b $1 git checkout -b $1
git push -u origin $1 git push -u origin $1
@ -91,43 +94,53 @@ function tag_replace {
git push origin $1 git push origin $1
} }
function grb {
git rebase -i HEAD~$1
}
function g_save { function g_save {
git add * git add *
git commit -m "[skip ci] Save: do not merge" git commit -m "[skip ci] Save: do not merge"
git push -f git push -f
} }
function grbm { function grb {
# Save actual branch git rebase -i HEAD~$1
}
function grbi {
# Save current branch
BRANCH=$(git branch | grep \* | cut -d ' ' -f2) BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
# Checkout master & pull # Save parent branch
git checkout master PARENT=$(git_parent)
# Checkout parent & pull
git checkout ${PARENT}
git pull git pull
echo "Rebasing on" ${PARENT}
# Back to previous branch # Back to previous branch
git checkout ${BRANCH} git checkout ${BRANCH}
git rebase -i master git rebase --interactive ${PARENT}
} }
function grbr { function grbroot {
git rebase --interactive --autosquash --root git rebase --interactive --autosquash --root
} }
function gam {
git autofixup master
git rebase --interactive --autosquash master
}
function ga { function ga {
git autofixup HEAD~$1 git autofixup HEAD~$1
git rebase --interactive --autosquash HEAD~$1 git rebase --interactive --autosquash HEAD~$1
} }
function gai {
# Save parent branch
PARENT=$(git_parent)
echo "Rebasing with autofixup on" ${PARENT}
git autofixup ${PARENT}
git rebase --interactive --autosquash ${PARENT}
}
# Git amend # Git amend
alias amend_pro="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles GUIHENEUF <rguiheneuf@netatmo.com>\"' $1" alias amend_pro="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles GUIHENEUF <rguiheneuf@netatmo.com>\"' $1"
alias amend_perso="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles Guihéneuf <robin-charles@hotmail.fr>\"' $1" alias amend_perso="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles Guihéneuf <robin-charles@hotmail.fr>\"' $1"

View File

@ -9,9 +9,19 @@
# Debug parser Legrand # Debug parser Legrand
<debug_path>/debug_parser.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -r -pp -g <gateway_mac> <debug_path>/debug_parser.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -r -pp -g <gateway_mac>
# Enable debug mode Legrand
<debug_path>/debug_config_setter.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -g <gateway_mac> -t NLG -ke debug_enabled
# Disable debug mode Legrand
<debug_path>/debug_config_setter.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -g <gateway_mac> -t NLG -kd debug_enabled
# Analyse diagnosis
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint getdebuginfo -c <syncapi_path>/legrand_<server>.swp --mac <gateway_mac> | jq -r .body.diagnosis_content | <release_path>/decode_diagnosis.py
# Paths # Paths
$ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin" $ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin"
$ debug_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/debug" $ 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 # Variables
$ server: echo "prod inte" | tr " " "\n" $ server: echo "prod inte" | tr " " "\n"