Skip to content

Commit

Permalink
simplified version stamping (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy clark authored Nov 8, 2022
1 parent 3926eef commit 652076c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/integrate-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ jobs:
run: npm ci
-
name: Build legacy app
run: docker compose build --build-arg ENVIRONMENT=production --build-arg BUILD_VERSION=${{ steps.image.outputs.TAG_APP }} app
-
name: Verify version stamping
run: |
docker compose build --build-arg ENVIRONMENT=production --build-arg BUILD_VERSION=${{ steps.image.outputs.TAG_APP }} app
docker compose run --rm app cat /var/www/html/build-version.txt /var/www/html/version.php
docker compose run --rm app cat build-version.txt version.php
docker compose run --rm app cat version.php | grep ${{ steps.image.outputs.TAG_APP }}
-
name: Build "next" images
run: make build-next
Expand Down
4 changes: 2 additions & 2 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ COPY --from=composer-builder /composer/vendor /var/www/html/vendor
COPY docker/app/symfony-exceptions.patch /
RUN patch -p4 -i /symfony-exceptions.patch

RUN echo "${BUILD_VERSION}" > /var/www/html/build-version.txt \
&& sed -i /var/www/html/version.php -e "s/^\\(define('VERSION', '\\).*;\$/\\1${BUILD_VERSION}'\\);/"
RUN echo "${BUILD_VERSION}" > build-version.txt \
&& sed -i "s/9.9.9/${BUILD_VERSION}/" version.php

ENTRYPOINT [ "tini", "-g", "--" ]
CMD [ "apache2-foreground" ]

0 comments on commit 652076c

Please sign in to comment.