diff --git a/build/api/module/release.php b/build/api/module/release.php index 47c3d20..a2e4599 100755 --- a/build/api/module/release.php +++ b/build/api/module/release.php @@ -37,18 +37,18 @@ return ['ModuleError'=>ManagerError::UnreachableResource]; /* (2) Checks @project's folder */ - if( !is_dir($js[$project]['root']) ) + if( !is_dir($js[$project]['git']) ) return ['ModuleError'=>ManagerError::UnreachableResource]; /* (3) Checks @git directory */ - if( !is_dir($js[$project]['root'].'/.git') ) + if( !is_dir($js[$project]['git'].'/.git') ) return ['ModuleError'=>ManagerError::UnreachableResource]; /* [3] Launch script =========================================================*/ /* (1) Launch command + test */ - $stdout = shell_exec('cd '.$js[$project]['root'].'; git pull origin '.$branch.';'); + $stdout = shell_exec('cd '.$js[$project]['git'].'; git pull origin '.$branch.';'); /* (2) If error, raise error */ if( is_null($stdout) ) diff --git a/config/projects.json b/config/projects.json index a028a7a..cead3c2 100755 --- a/config/projects.json +++ b/config/projects.json @@ -1,10 +1,12 @@ { "nxtic": { - "root": "/var/www/nxtic" + "apache": "/vhost/nxtic", + "git": "/vhost/git-repositories/nxtic" }, "prod-releaser": { - "root": "/var/www/prod-releaser" + "apache": "/vhost/prod-releaser", + "git": "/vhost/git-repositories/prod-release.php" } }