Skip to content

Commit 77615ee

Browse files
committed
Remove build/version hash/bower related code
1 parent 0050d42 commit 77615ee

File tree

7 files changed

+3
-144
lines changed

7 files changed

+3
-144
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.idea/
2-
bower_components/
3-
/dist/
42
/config_override.php
53

64
.DS_Store

.travis.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

bower.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

build.sh

Lines changed: 0 additions & 65 deletions
This file was deleted.

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
$config = array(
7-
'version' => 'VIEWER_VERSION',
7+
'version' => '1.1.0',
88
'profile_files_dir' => '/tmp/profile_files',
99
);
1010

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"name": "xhprof-viewer",
3-
"version": "1.0.9",
43
"private": true,
54
"description": "Extended xhprof viewer that supports both OOTB file format as well as extended file format with sql count and wall time.",
65
"scripts": {
76
"test": "echo \"Error: no test specified\" && exit 1",
8-
"env": "env",
9-
"build": " ./build.sh"
7+
"env": "env"
108
},
119
"repository": {
1210
"type": "git",

src/php/Helpers/VersionHelper.php

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,6 @@ public function getCurrentVersion()
1919
{
2020
global $config;
2121
$version = $config['version'];
22-
23-
if ($version == 'VIEWER_VERSION') {
24-
return $this->getHeadHash();
25-
} else {
26-
return array('type' => 'version', 'version' => $version);
27-
}
28-
}
29-
30-
/**
31-
* Returns git HEAD hash as version
32-
*
33-
* @return array|bool
34-
*/
35-
protected function getHeadHash()
36-
{
37-
$output = exec('git rev-parse --verify HEAD', $outputLines, $code);
38-
if ($code) {
39-
return false;
40-
}
41-
42-
return array('type' => 'hash', 'version' => $output);
22+
return array('type' => 'version', 'version' => $version);
4323
}
4424
}

0 commit comments

Comments
 (0)