Skip to content
This repository was archived by the owner on Apr 12, 2020. It is now read-only.
/ browser Public archive

Commit 8b603f1

Browse files
alexandresalomelyrixx
alexandresalome
authored andcommitted
add blob support in repository configuration
1 parent 68c68c3 commit 8b603f1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

config/prod.php-dist

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ $gitonomy['repositories'] = array(
77

88
// or
99
// $gitonomy['repositories'] = '/var/www/';
10+
11+
// or
12+
// $gitonomy['repositories'] = '/var/www/dev-*';

src/Gitonomy/Browser/Utils/RepositoriesFinder.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ class RepositoriesFinder
88
{
99
public function getRepositories($path)
1010
{
11-
$repositoriesTmp = $this->recurseDirectory($path);
1211
$repositories = array();
1312

13+
if (false !== strpos($path, '*')) {
14+
$repositoriesTmp = glob($path);
15+
} else {
16+
$repositoriesTmp = $this->recurseDirectory($path);
17+
}
18+
1419
foreach ($repositoriesTmp as $repo) {
15-
$repositories[] = new Repository($repo);
20+
$repositories[basename($repo)] = new Repository($repo);
1621
}
1722

1823
return $repositories;

0 commit comments

Comments
 (0)