Change back to the current working directory after getting the version
This commit is contained in:
parent
890080c046
commit
5f3e5c2b3c
|
@ -3,6 +3,7 @@
|
||||||
error_reporting(E_ALL | E_STRICT);
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
$baseDir = dirname(__DIR__);
|
$baseDir = dirname(__DIR__);
|
||||||
|
$cwd = getcwd();
|
||||||
$templatePath = $baseDir . '/templates';
|
$templatePath = $baseDir . '/templates';
|
||||||
$consoleTemplatePath = $baseDir . '/src/Resume/Templates';
|
$consoleTemplatePath = $baseDir . '/src/Resume/Templates';
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ $console = new Resume\Cli\Resume();
|
||||||
chdir($baseDir);
|
chdir($baseDir);
|
||||||
$versionCmd = 'git describe --abbrev=0 --tags';
|
$versionCmd = 'git describe --abbrev=0 --tags';
|
||||||
$version = trim(shell_exec($versionCmd));
|
$version = trim(shell_exec($versionCmd));
|
||||||
|
chdir($cwd);
|
||||||
|
|
||||||
// Fetch the project name and description
|
// Fetch the project name and description
|
||||||
$project = json_decode(file_get_contents(__DIR__ . '/../composer.json'));
|
$project = json_decode(file_get_contents(__DIR__ . '/../composer.json'));
|
||||||
|
|
Loading…
Reference in New Issue