mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Adjusted links to be more generic
This commit is contained in:
@@ -171,7 +171,7 @@ class Debug extends CI_Controller
|
||||
try {
|
||||
$st=exec('git fetch');
|
||||
$versions['branch'] = trim(exec('git rev-parse --abbrev-ref HEAD')); // Get ONLY Name of the Branch we're on
|
||||
$versions['latest_commit_hash']=substr(trim(exec('git log --pretty="%H" -n1 HEAD..origin'.'/'.$versions['branch'])),0,8); // fetch latest commit-hash from repo
|
||||
$versions['latest_commit_hash']=substr(trim(exec('git log --pretty="%H" -n1 origin'.'/'.$versions['branch'])),0,8); // fetch latest commit-hash from repo
|
||||
} catch (Exception $e) {
|
||||
$versions['latest_commit_hash']='';
|
||||
$versions['branch']='';
|
||||
|
||||
@@ -229,9 +229,9 @@
|
||||
$branch = trim(exec('git rev-parse --abbrev-ref HEAD')); // Get ONLY Name of the Branch we're on
|
||||
$url = trim(exec('git remote get-url ' . $remote));
|
||||
if (strpos($url, 'https://github.com') !== false) {
|
||||
$owner = preg_replace('/https:\/\/github\.com\/(\w+)\/Wavelog\.git/', '$1', $url);
|
||||
$owner = preg_replace('/https:\/\/github\.com\/(\w+)\/[w|W]avelog\.git/', '$1', $url);
|
||||
} else if (strpos($url, 'git@github.com') !== false) {
|
||||
$owner = preg_replace('/git@github\.com:(\w+)\/Wavelog\.git/', '$1', $url);
|
||||
$owner = preg_replace('/git@github\.com:(\w+)\/[w|W]avelog\.git/', '$1', $url);
|
||||
}
|
||||
}
|
||||
$tag = trim(exec('git describe --tags ' . $commitHash));
|
||||
@@ -267,7 +267,7 @@
|
||||
<td>Commit</td>
|
||||
<td>
|
||||
<?php if ($commitHash != "") { ?>
|
||||
<a target="_blank" href="https://github.com/wavelog/wavelog/commit/<?php echo $commitHash ?>"><span class="badge text-bg-success"><?php echo substr($commitHash, 0, 8); ?></span></a>
|
||||
<a target="_blank" href="https://github.com/<?php echo $owner; ?>/Wavelog/commit/<?php echo $commitHash ?>"><span class="badge text-bg-success"><?php echo substr($commitHash, 0, 8); ?></span></a>
|
||||
<?php } else { ?>
|
||||
<span class="badge text-bg-danger">n/a</span>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user