Skip to content

Commit

Permalink
Remove build/version hash/bower related code
Browse files Browse the repository at this point in the history
  • Loading branch information
ramanenka committed Mar 19, 2018
1 parent 0050d42 commit 77615ee
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 144 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.idea/
bower_components/
/dist/
/config_override.php

.DS_Store
Expand Down
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions bower.json

This file was deleted.

65 changes: 0 additions & 65 deletions build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

$config = array(
'version' => 'VIEWER_VERSION',
'version' => '1.1.0',
'profile_files_dir' => '/tmp/profile_files',
);

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"name": "xhprof-viewer",
"version": "1.0.9",
"private": true,
"description": "Extended xhprof viewer that supports both OOTB file format as well as extended file format with sql count and wall time.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"env": "env",
"build": " ./build.sh"
"env": "env"
},
"repository": {
"type": "git",
Expand Down
22 changes: 1 addition & 21 deletions src/php/Helpers/VersionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ public function getCurrentVersion()
{
global $config;
$version = $config['version'];

if ($version == 'VIEWER_VERSION') {
return $this->getHeadHash();
} else {
return array('type' => 'version', 'version' => $version);
}
}

/**
* Returns git HEAD hash as version
*
* @return array|bool
*/
protected function getHeadHash()
{
$output = exec('git rev-parse --verify HEAD', $outputLines, $code);
if ($code) {
return false;
}

return array('type' => 'hash', 'version' => $output);
return array('type' => 'version', 'version' => $version);
}
}

0 comments on commit 77615ee

Please sign in to comment.