소스 검색

Arreglos varios

gabriel 6 년 전
부모
커밋
7920d13104
2개의 변경된 파일27개의 추가작업 그리고 3개의 파일을 삭제
  1. 20 1
      tools/installModules.sh
  2. 7 2
      tools/src/Release.php

+ 20 - 1
tools/installModules.sh

@@ -290,6 +290,18 @@ then
     else
         echo "SE ASUME QUE LOS DOMINIOS YA ESTAN DADOS DE ALTA"
     fi
+else
+    echo ""
+    echo ""
+    DIRINSTALL=$DIRINSTALLDEFAULT
+    echo "Ingrese el directorio absoluto de instalacion: (default: $DIRINSTALLDEFAULT)"
+    read DIRINSTALL
+    if [ "$DIRINSTALL" = "" ];
+    then
+        DIRINSTALL=$DIRINSTALLDEFAULT
+    fi
+    echo "Ingresando al directorio $DIRINSTALL"
+    cd $DIRINSTALL
 fi
 ###################################################################
 echo ""
@@ -299,12 +311,19 @@ echo "El archivo se creara con las siguientes instrucciones"
 echo $FILEANSIBLE
 echo ""
 echo "Desea modificar el archivo? Si se deja en blanco se toma el default. Sino ingrese las lineas para crear el archivo de ejecucion"
+echo "Opciones:"
+echo "    Ingrese 'n' para omitir este paso."
+echo "    Presionar enter crear el archivo por default que se muestra arriba"
+echo "    Puede ingresar el comando que desee ejecutar."
 read COMMAND
 if [ "$COMMAND" = "" ];
 then
     echo -e $FILEANSIBLE > $DIRINSTALL/ansible.run
 else
-    echo -e $COMMAND > $DIRINSTALL/ansible.run
+    if [ "$COMMAND" != "n" ] && [ "$COMMAND" != "N" ];
+    then
+        echo -e $COMMAND > $DIRINSTALL/ansible.run
+    fi
 fi
 docker run -it -v $DIRINSTALL:$DIRINSTALL -v /var/run/docker.sock:/tmp/docker.sock dind ansible
 exit 1

+ 7 - 2
tools/src/Release.php

@@ -285,7 +285,7 @@ class Release extends Command
             // creo el archivo de log de como se ejecuto
             $this->createFileRunning($input, $output);
             // cargo las fuentes a clonar
-            $this->createGitClone();
+            $this->createGitClone($input);
             // creo el archivo docker-compose.yml
             $this->getDockerComposer($docker_tag, "host.env", "docker.infra.flowdat.com/");
             // escribo el archivo de host
@@ -468,7 +468,7 @@ class Release extends Command
     /**
      * Crea un array con las direcciones de a clonar.
      */
-    protected function createGitClone()
+    protected function createGitClone(InputInterface $input)
     {
         $clone = array();
         $modules = array_keys($this->_modules);
@@ -481,6 +481,11 @@ class Release extends Command
                 );
             }
         }
+        $name = 'extra';
+        $clone[$name] = array(
+            'url' => $input->getOption($name . "-repo"),
+            'branch' => $input->getOption($name . "-ref")
+        );
         $this->_dObj->file("git.ini")->writeIniConfig($clone);
     }