Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Altera funções para executar comandos em sub bash
Browse files Browse the repository at this point in the history
  • Loading branch information
cantuariavc committed Apr 22, 2020
1 parent 8bb3444 commit 4cf772a
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions scripts/rebuild_frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,32 @@ verifica_diretorios_sapl() {
fi
}

salva_wip() {
salva_wip() {(
cd $ROOT_DIR/$1
git add .
git stash
}
)}

restaura_wip() {
git stash pop
git reset HEAD .
}

atualiza_branch() {
git checkout "$1"
git pull origin "$1" --rebase
}
atualiza_branch() {(
cd $ROOT_DIR/$1
git checkout $2
git pull origin $2 --rebase
)}

adiciona_commit() {
adiciona_commit() {(
cd $ROOT_DIR/sapl
git add .
git commit -m "Rebuild Frontend"
git push origin "$1"
}
git push origin $1
)}

restaura_wip() {(
cd $ROOT_DIR/$1
git checkout $2
git stash pop
git restore --staged .
)}


BASE_DIR=${PWD%/scripts}
ROOT_DIR=${BASE_DIR%/sapl-frontend}
Expand Down

0 comments on commit 4cf772a

Please sign in to comment.