Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Commit e89f690

Browse files
author
Claas Augner
committed
Show commit hash at index.
1 parent e016384 commit e89f690

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Telemetry/InboxApp.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __construct(Repository $repo) {
1414

1515
// Index.
1616
$this->get('/', function() {
17-
return $this->index();
17+
return trim(`git rev-parse --short --verify HEAD`);
1818
});
1919

2020
// Count.
@@ -54,13 +54,4 @@ public function __construct(Repository $repo) {
5454
], 500);
5555
});
5656
}
57-
58-
public function index() {
59-
if (is_dir(__DIR__ . '/../.git')) {
60-
exec('git rev-parse --short --verify HEAD', $output);
61-
return $output[0];
62-
} else {
63-
return self::VERSION;
64-
}
65-
}
6657
}

0 commit comments

Comments
 (0)