Change back to the current working directory after getting the version

This commit is contained in:
Asbjørn Ulsberg 2017-11-13 22:09:59 +01:00
parent 890080c046
commit 5f3e5c2b3c
No known key found for this signature in database
GPG Key ID: 34616339C3D5E883
1 changed files with 2 additions and 0 deletions

View File

@ -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'));