Skip to content

Commit 15a1960

Browse files
authored
Merge pull request #1 from magento-pangolin/MQE-2325
MQE-2325: bin/svc --version to return SVC version number
2 parents d91e827 + 2289b81 commit 15a1960

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

bin/svc

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ if (PHP_SAPI !== 'cli') {
2121
}
2222

2323
try {
24-
$application = new Application();
24+
$composerContents = json_decode(file_get_contents(__DIR__ . '/../composer.json'), true);
25+
$version = $composerContents['version'] ?? '';
26+
$name = $composerContents['description'] ?? 'Magento Semantic Version Checker';
27+
$application = new Symfony\Component\Console\Application();
28+
$application->setName($name);
29+
$application->setVersion($version);
2530
$application->add(new CompareSourceCommand());
2631
$application->run();
2732
} catch (\Exception $e) {

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "magento/magento-semver",
3-
"description": "Magento semantic version checker",
3+
"description": "Magento Semantic Version Checker",
44
"version": "7.0.0",
55
"license": [
66
"OSL-3.0",

0 commit comments

Comments
 (0)