Skip to content

Commit

Permalink
trying to add version to app
Browse files Browse the repository at this point in the history
bump php and composer version in docker image
  • Loading branch information
Dannecron committed Dec 26, 2023
1 parent 3433be1 commit 91b50b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG PHP_VERSION=8.2.11
ARG COMPOSER_VERSION=2.6.5
ARG PHP_VERSION=8.2.13
ARG COMPOSER_VERSION=2.6.6
ARG MERGER_VERSION=dev-master

FROM composer:${COMPOSER_VERSION} as composer

Expand All @@ -15,4 +16,6 @@ RUN composer update --no-dev
COPY merger merger
COPY src src

ENV MERGER_VERSION=${MERGER_VERSION}

ENTRYPOINT ["/app/merger"]
1 change: 1 addition & 0 deletions .github/workflows/ci-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg PHP_VERSION=${{ vars.DOCKER_RUNTIME_PHP_VERSION }} \
--build-arg COMPOSER_VERSION=${{ vars.DOCKER_RUNTIME_COMPOSER_VERSION }} \
--build-arg MERGER_VERSION=${{ github.ref_name }} \
--target=runtime \
--tag=dannecron/coverage-merger:${{ github.ref_name }} \
--file=./.github/Dockerfile .
Expand Down
7 changes: 6 additions & 1 deletion merger
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ if (isset($GLOBALS['_composer_autoload_path'])) {
unset($knownAutoloadPaths, $path);
}

$app = new \Ahc\Cli\Application('clover-merger', '0.1.0');
$appVersion = \getenv('MERGER_VERSION');
if ($appVersion === false) {
$appVersion = 'dev';
}

$app = new \Ahc\Cli\Application('clover-merger', $appVersion);

$app->onException(static function (\Throwable $exception, int $exitCode) use ($app): void {
$io = $app->io();
Expand Down

0 comments on commit 91b50b0

Please sign in to comment.