CI: Build translation files for container and release archive

This commit is contained in:
Igor Scheller 2019-10-06 15:50:45 +02:00
parent 154625bc8a
commit fcdd116f14
1 changed files with 7 additions and 2 deletions

View File

@ -4,7 +4,12 @@ COPY ./ /app/
RUN composer --no-ansi install --no-dev --ignore-platform-reqs RUN composer --no-ansi install --no-dev --ignore-platform-reqs
RUN composer --no-ansi dump-autoload --optimize RUN composer --no-ansi dump-autoload --optimize
# Intermediate container for less layers # Intermediate containers for less layers
FROM alpine as translation
RUN apk add gettext
COPY resources/lang/ /data
RUN find /data -type f -name '*.po' -exec sh -c 'file="{}"; msgfmt "${file%.*}.po" -o "${file%.*}.mo"' \;
FROM alpine as data FROM alpine as data
COPY .babelrc .browserslistrc composer.json LICENSE package.json README.md webpack.config.js yarn.lock /app/ COPY .babelrc .browserslistrc composer.json LICENSE package.json README.md webpack.config.js yarn.lock /app/
COPY bin/ /app/bin COPY bin/ /app/bin
@ -13,11 +18,11 @@ COPY db/ /app/db
RUN mkdir /app/import/ RUN mkdir /app/import/
COPY includes/ /app/includes COPY includes/ /app/includes
COPY public/ /app/public COPY public/ /app/public
COPY resources/lang /app/resources/lang
COPY resources/views /app/resources/views COPY resources/views /app/resources/views
COPY src/ /app/src COPY src/ /app/src
COPY storage/ /app/storage COPY storage/ /app/storage
COPY --from=translation /data/ /app/resources/lang
COPY --from=composer /app/vendor/ /app/vendor COPY --from=composer /app/vendor/ /app/vendor
COPY --from=composer /app/composer.lock /app/ COPY --from=composer /app/composer.lock /app/