Browse Source

Maj succes Git

stany.ferer 1 year ago
parent
commit
6c7c251c2f
4 changed files with 10 additions and 6 deletions
  1. 3 3
      core/class/git.class.php
  2. 3 1
      maj/preprod.sh
  3. 3 1
      maj/prod.sh
  4. 1 1
      maj/r7.sh

+ 3 - 3
core/class/git.class.php

@@ -5,10 +5,10 @@ class git
     public static function checkError(string $_string = NULL){
         $return = NULL;
         if($_string != NULL){
-            if(strpos($_string, '(use "git pull" to update your local branch)') === FALSE){
-                $return = FALSE;
+            if(strpos($_string, '-// SUCCESS //-') === TRUE){
+                $return = TRUE;
             } else {
-                return TRUE;
+                return FALSE;
             }
 
             return $return;

+ 3 - 1
maj/preprod.sh

@@ -1,3 +1,5 @@
+#!/bin/bash
+
 FOLDER=pp.cms.cse-invent.com
 BRANCH_ORIGIN=r7
 BRANCH=preprod
@@ -24,4 +26,4 @@ git pull origin ${BRANCH_ORIGIN} || { echo "Échec du pull depuis ${BRANCH_ORIGI
 echo "Push des changements en cours..."
 git push || { echo "Échec du push."; exit 1; }
 
-echo "Script GIT terminé avec succès."
+echo "-// SUCCESS //-";

+ 3 - 1
maj/prod.sh

@@ -1,3 +1,5 @@
+#!/bin/bash
+
 FOLDER=cms.cse-invent.com
 BRANCH_ORIGIN=preprod
 BRANCH=master
@@ -24,4 +26,4 @@ git pull origin ${BRANCH_ORIGIN} || { echo "Échec du pull depuis ${BRANCH_ORIGI
 echo "Push des changements en cours..."
 git push || { echo "Échec du push."; exit 1; }
 
-echo "Script GIT terminé avec succès."
+echo "-// SUCCESS //-";

+ 1 - 1
maj/r7.sh

@@ -26,4 +26,4 @@ git pull origin ${BRANCH_ORIGIN} || { echo "Échec du pull depuis ${BRANCH_ORIGI
 echo "Push des changements en cours..."
 git push || { echo "Échec du push."; exit 1; }
 
-echo "Script GIT terminé avec succès."
+echo "-// SUCCESS //-";