Commit 17ac8f9e authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Asigna al entorno las variables de descubrimiento

parent addf8934
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
        if [ ! -z ${COMPOSE_FILE} ];
        then
          echo "Automatically set COMPOSE_FILE to '${COMPOSE_FILE}'";
          export COMPOSE_FILE="${COMPOSE_FILE}";
        fi;
      fi;
  script: deploy
+2 −4
Original line number Diff line number Diff line
@@ -30,28 +30,26 @@
          then
            echo "Detected '${directory}/${firstNewComposeFile}' compose file, nice!";
            COMPOSE_FILE_NAME="${NEW_COMPOSE_FILE_NAME}";
            COMPOSE_PROJECT_DIRECTORY="${directory}";
          elif [ -f ${directory}/${newSingleComposeFile} ];
          then
            echo "Detected '${directory}/${newSingleComposeFile}' compose file, nice!";
            COMPOSE_FILE_NAME="${newSingleComposeFile}";
            COMPOSE_PROJECT_DIRECTORY="${directory}";
          elif [ -f ${directory}/${firstOldComposeFile} ];
          then
            echo "Detected '${directory}/${firstOldComposeFile}' compose file (old naming)";
            COMPOSE_FILE_NAME="${OLD_COMPOSE_FILE_NAME}";
            COMPOSE_PROJECT_DIRECTORY="${directory}";
          elif [ -f ${directory}/${oldSingleComposeFile} ];
          then
            echo "Detected '${directory}/${oldSingleComposeFile}' compose file (old naming)";
            COMPOSE_FILE_NAME="${oldSingleComposeFile}";
            COMPOSE_PROJECT_DIRECTORY="${directory}";
          else
            echo "No compose file detected at '${directory}/'";
          fi;
          if [ ! -z ${COMPOSE_FILE_NAME} ];
          then
            echo "Automatically set COMPOSE_FILE_NAME to '${COMPOSE_FILE_NAME}' and COMPOSE_PROJECT_DIRECTORY to '${COMPOSE_PROJECT_DIRECTORY}'";
            export COMPOSE_FILE_NAME="${COMPOSE_FILE_NAME}";
            export COMPOSE_PROJECT_DIRECTORY="${directory}";
          fi;
        fi;
      done;