Last active
October 10, 2019 13:10
-
-
Save IsaiasSantana/48b79170cab035e519ee29ec9f9d94fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| current_branch=`git branch | grep '*' | sed 's/* //'` | |
| green=`tput setaf 2` | |
| reset=`tput sgr0` | |
| red=`tput setaf 1` | |
| yellow='\033[1;33m' | |
| echo "\nVerificando seu commit no branch ${green} $current_branch ${reset} (: Aguarde...." | |
| echo "\n${red}Formatando o código.........${reset}\n" | |
| flutter format . --set-exit-if-changed | |
| status=$? | |
| if [ $status -eq 1 ]; then | |
| printf "\n${yellow}Arquivos foram formatados, verifique-os e tente novamente.${reset}\n" | |
| exit 1 | |
| fi | |
| echo "\n${yellow}Aplicando o Lint.....${reset}\n" | |
| flutter analyze | |
| if [ $? -ne 0 ]; then | |
| echo "\n${red}Eita, algo de errado não está certo ):${reset}\n" | |
| exit 1 | |
| fi | |
| echo "\n Tudo Certo! Agora vamos rodar os testes (:" | |
| flutter test | |
| if [$? -ne 0]; then | |
| echo "${red}Um ou mais testes falharam /:${reset}" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment