-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
356 additions
and
179 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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
3.0.2 | ||
3.0.3 |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
if (! isset($_SERVER['TOBA_DIR'])) { | ||
$toba_dir = realpath(__DIR__.'/../'); | ||
$path_autoload = '/vendor/autoload.php'; | ||
if (! file_exists($toba_dir.'/php/consola/run.php')) { | ||
//Estoy dentro del vendor/bin de composer | ||
$toba_dir = realpath(__DIR__.'/../siu-toba/framework'); | ||
$path_autoload = '/../../..'. $path_autoload; | ||
if (! file_exists($toba_dir.'/php/consola/run.php')) { | ||
die("No se encuentra la carpeta de Toba, ni la variable de entorno TOBA_DIR"); | ||
} | ||
} | ||
$_SERVER['TOBA_DIR'] = $toba_dir; | ||
|
||
//Hago todas las rutas relativas a TOBA_DIR que es lo unico constante | ||
include(realpath($toba_dir . $path_autoload)); //Necesito cargar el autoload de composer antes, sino no funca nada | ||
$path_env = (stripos($toba_dir, DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR) !== false) ? realpath($toba_dir . '/../../../../') : $toba_dir; | ||
if (file_exists($path_env. '/entorno_toba.env')) { | ||
$dotenv = new Dotenv\Dotenv($path_env, 'entorno_toba.env'); | ||
$dotenv->load(); | ||
//Chequeo que existan las variables correspondientes... deberia pero bue nunca esta de mas. | ||
$dotenv->required('TOBA_INSTANCIA'); | ||
$dotenv->required('TOBA_INSTALACION_DIR'); | ||
} | ||
} | ||
|
||
require_once($_SERVER['TOBA_DIR'].'/php/consola/run.php'); | ||
|
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 |
---|---|---|
@@ -1,17 +1,4 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
#!/usr/bin/env php | ||
<?php require_once('launcher.php'); | ||
|
||
if (! isset($_SERVER['TOBA_DIR'])) { | ||
$toba_dir = realpath(__DIR__.'/../'); | ||
if (! file_exists($toba_dir.'/php/consola/run.php')) { | ||
//Estoy dentro del vendor/bin de composer | ||
$toba_dir = realpath(__DIR__.'/../siu-toba/framework'); | ||
if (! file_exists($toba_dir.'/php/consola/run.php')) { | ||
die("No se encuentra la carpeta de Toba, ni la variable de entorno TOBA_DIR"); | ||
} | ||
} | ||
$_SERVER['TOBA_DIR'] = $toba_dir; | ||
} | ||
|
||
include($_SERVER['TOBA_DIR'].'/php/consola/run.php'); | ||
|
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
@echo off | ||
set TOBA_DIR=%~dp0.. | ||
php "%TOBA_DIR%\php\consola\run.php" %* | ||
@echo off | ||
php "launcher.php" %* |
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
Oops, something went wrong.