Sentry recipe fails when there's no .git directory
Closed this issue · 2 comments
atymic commented
Deployer version: 6.4.5
PHP version: 7.3
When using the sentry recipe, if there's no .git
folder the deployment fails. This is because my deployment is run from gitlab CI, inside a docker container.
When using the following:
set('sentry', [
'organization' => 'org',
'project' => 'project',
'token' => 'token...',
'version' => getenv('CI_COMMIT_SHA'),
]);
I get the error:
The command "cd /path/releases/8 && (git rev-parse HEAD)" failed.
I tried overriding the commits
option to a blank array, but this fails the validation.
set('sentry', [
'organization' => 'org',
'project' => 'project',
'token' => 'token...',
'version' => getenv('CI_COMMIT_SHA'),
'commits' => [],
]);
I'd be happy to create a PR to add a check, and skip adding commits if .git
isn't present.
antonmedv commented
PR will be cool.