-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
1 changed file
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,12 @@ | |
# OPTIONS: --- | ||
# REQUIREMENTS: Android 5.0+ | ||
# Termux (https://termux.com/) | ||
# curl (pkg install curl) | ||
# curl, use comando: | ||
# apt update && apt -y upgrade && pkg install -y curl | ||
# | ||
# Para baixar este arquivo, uma forma e' o seguinte comando | ||
# curl https://raw.githubusercontent.com/EticaAI/eticaai-shell-scripts/master/termux/0-a-heroi/teste-completo.sh -o teste-completo.sh | ||
# | ||
# BUGS: --- | ||
# NOTES: --- | ||
# AUTHOR: Emerson Rocha, [email protected] | ||
|
@@ -26,6 +31,13 @@ | |
# REVISION: --- | ||
#=============================================================================== | ||
|
||
# A linha a seguir indica que erros inesperados devem falhar imediatamente este | ||
# script. | ||
set -e | ||
|
||
TEST_AUTOMATIC_REPO_URL="[email protected]:eticaaibot/0-a-heroi-teste.git" | ||
TEST_AUTOMATIC_REPO_FOLDER="0-a-heroi-teste" | ||
|
||
### Geracao do par de chave de eticaaibot (feita num Linux Ubuntu) | ||
## ssh-keygen -t rsa -b 4096 -C "[email protected]" | ||
# Destino, private key /alligo/code/eticaai/eticaai-shell-scripts/temp/id_rsa-eticaaibot | ||
|
@@ -85,6 +97,41 @@ else | |
fi | ||
### TESTE SE VARIAVEIS DE AMBIENTE FORAM DEFINIDAS, fim | ||
|
||
echo "Criando diretorio " | ||
echo ">>> Criando diretorio $SSL_LOCAL_FOLDER" | ||
mkdir $SSL_LOCAL_FOLDER | ||
curl http://example.com --output $TEST_PRIVATEKEY_LOCALFILE | ||
|
||
echo ">>> Importando chave privada padrao" | ||
curl $TEST_PRIVATEKEY --output $TEST_PRIVATEKEY_LOCALFILE | ||
|
||
echo ">>> Instalando todas as dependencias de passo a passo 0-a-heroi.sh" | ||
apt update | ||
apt -y upgrade | ||
pkg install -y openssh | ||
pkg install -y git | ||
|
||
echo ">>> Testando se o GitHub acredita que podemos commitar..." | ||
ssh -T [email protected] | ||
|
||
echo ">>> Criando pasta ~/code/eticaai" | ||
mkdir -p "~/code/eticaai" | ||
|
||
echo ">>> entrando na pasta ~/code/eticaai" | ||
cd ~/code/eticaai | ||
|
||
echo ">>> clonando $TEST_AUTOMATIC_COMMIT" | ||
git clone $TEST_AUTOMATIC_REPO_URL | ||
cd $TEST_AUTOMATIC_REPO_FOLDER | ||
|
||
echo ">>> criando mudanca num arquivo" | ||
echo date >> teste-commit.txt | ||
|
||
echo ">>> git add ." | ||
git add . | ||
|
||
echo ">>> git commit -m date" | ||
git commit -m date | ||
|
||
echo ">>> git push" | ||
git push | ||
|
||
echo "FIM DE teste-completo.sh" |