refactor(versioning): improve how current version and branch is determined and set

Refactor `Postal.version`` and `Postal.branch` and remove `Postal::VERSION`.
This commit is contained in:
Adam Cooke
2024-03-21 14:55:14 +00:00
parent a3fab36da2
commit 07c6b317f2
3 changed files with 25 additions and 28 deletions
+4 -4
View File
@@ -43,10 +43,10 @@ COPY ./docker/wait-for.sh /docker-entrypoint.sh
COPY --chown=postal . .
# Export the version
ARG VERSION=null
ARG BRANCH=null
RUN echo $VERSION > VERSION \
&& echo $BRANCH > BRANCH
ARG VERSION
ARG BRANCH
RUN if [ "$VERSION" != "" ]; then echo $VERSION > VERSION; fi \
&& if [ "$BRANCH" != "" ]; then echo $BRANCH > BRANCH; fi
# Set paths for when running in a container
ENV POSTAL_CONFIG_FILE_PATH=/config/postal.yml