Skip to content

Commit

Permalink
Merge pull request #3 from mediact/feature/AEQ-290
Browse files Browse the repository at this point in the history
1.0.3 - Support multiple capture groups
  • Loading branch information
Klaas Sangers authored Dec 19, 2017
2 parents 3ac35b7 + 6b90ee4 commit 00c5c7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
29 changes: 0 additions & 29 deletions bitbucket-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/UnixFileMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(
$this->destinationDirectory = $destinationDirectory;

// Expand the source and destination.
static $pattern = '/({(.*),(.*)})/';
static $pattern = '/({(.*?),(.*?)})/';
$this->source = preg_replace($pattern, '$2', $mapping);
$this->destination = preg_replace($pattern, '$3', $mapping);
}
Expand Down
5 changes: 5 additions & 0 deletions tests/UnixFileMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public function mappingProvider(): array
'bitbucket-pipelines.yml{.dist,}',
'bitbucket-pipelines.yml.dist',
'bitbucket-pipelines.yml'
],
[
'{default/,}bitbucket-pipelines.yml{.dist,}',
'default/bitbucket-pipelines.yml.dist',
'bitbucket-pipelines.yml'
]
];
}
Expand Down

0 comments on commit 00c5c7d

Please sign in to comment.