Skip to content

Commit

Permalink
[EasyBugsnag] Cache app version in env var once resolved (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
natepage committed Jul 2, 2021
1 parent 53b071e commit 28b248b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ private function resolveAppVersion(): ?string
$awsData = $this->getAwsFargateTaskData();
$image = (string)($awsData['Containers'][0]['Image'] ?? '');

return \explode(':', $image)[1] ?? null;
$appVersion = \explode(':', $image)[1] ?? null;

if ($appVersion !== null) {
\putenv(\sprintf('APP_VERSION=%s', (string)$appVersion));
}

return $appVersion;
}

/**
Expand Down

0 comments on commit 28b248b

Please sign in to comment.