Merge pull request 'Modifié : automate.sh' (#9) from test into main

Reviewed-on: #9
This commit is contained in:
guillaume.emorine 2024-04-29 09:50:37 +02:00
commit 5e4baa9313

View File

@ -11,7 +11,7 @@ export https_proxy="http://10.121.38.1:8080/"
echo "Voulez-vous récupérer les fichiers du dépôt ou effectuer un push sur le dépôt ? echo "Voulez-vous récupérer les fichiers du dépôt ou effectuer un push sur le dépôt ?
[1 = Pull, 2 = Push]" [1 = Pull, 2 = Push]"
read answer read answer
echo "Quelle branche est concernée ? [1 = main, 2 = tests]" echo "Quelle branche est concernée ? [1 = main, 2 = test]"
read branch read branch
if [ $branch == 1 ] ; then if [ $branch == 1 ] ; then
if [ $answer == 1 ] ; then if [ $answer == 1 ] ; then
@ -32,11 +32,11 @@ if [ $branch == 1 ] ; then
fi fi
else else
if [ $answer == 1 ] ; then if [ $answer == 1 ] ; then
git checkout tests git checkout test
echo "Récupération des fichiers à jour dans la branche tests..." echo "Récupération des fichiers à jour dans la branche tests..."
git pull origin tests git pull origin tests
else else
git checkout tests git checkout test
echo "Ajout des fichiers au Gitea, branche tests..." echo "Ajout des fichiers au Gitea, branche tests..."
sleep 2 sleep 2
git add . git add .
@ -45,6 +45,6 @@ else
git commit git commit
echo "Push des fichiers au Gitea, branche tests..." echo "Push des fichiers au Gitea, branche tests..."
sleep 2 sleep 2
git push origin tests git push origin test
fi fi
fi fi