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

Commit

Permalink
Adiciona laços para executar funções
Browse files Browse the repository at this point in the history
  • Loading branch information
cantuariavc committed Apr 22, 2020
1 parent 4cf772a commit 43c9abb
Showing 1 changed file with 23 additions and 27 deletions.
50 changes: 23 additions & 27 deletions scripts/rebuild_frontend.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=SC2063
# shellcheck disable=SC2068
# shellcheck disable=SC2086
# shellcheck disable=SC2164

Expand Down Expand Up @@ -52,32 +53,27 @@ restaura_wip() {(
BASE_DIR=${PWD%/scripts}
ROOT_DIR=${BASE_DIR%/sapl-frontend}

# sapl-frontend/
verifica_diretorios_sapl
OLD_FRONTEND_BRANCH=$(git branch | grep '^*' | cut -d ' ' -f2)
OLD_BACKEND_BRANCH=$(cd $ROOT_DIR/sapl && git branch | grep '^*' | cut -d ' ' -f2)

# sapl/
salva_wip
atualiza_branch "master"
cd -
# sapl-frontend/
salva_wip
atualiza_branch "master"
./run-yarn.sh build
cd -
# sapl/
adiciona_commit "master"
git checkout -
atualiza_branch "3.1.x"
cd -
# sapl-frontend/
git checkout -
atualiza_branch "3.1.x"
./run-yarn.sh build
git checkout -
restaura_wip
cd -
# sapl/
adiciona_commit "3.1.x"
git checkout -
restaura_wip
cd ../sapl-frontend/scripts
BRANCHS=("3.1.x" "master")
REPOS=("sapl-frontend" "sapl")

for REPO in ${REPOS[@]}; do
salva_wip $REPO &>/dev/null
done
wait

for BRANCH in ${BRANCHS[@]}; do
for REPO in ${REPOS[@]}; do
atualiza_branch $REPO $BRANCH &>/dev/null
done
wait
./run-yarn.sh build
adiciona_commit $BRANCH
done

restaura_wip "sapl-frontend" $OLD_FRONTEND_BRANCH &>/dev/null
restaura_wip "sapl" $OLD_BACKEND_BRANCH &>/dev/null
wait

0 comments on commit 43c9abb

Please sign in to comment.