Skip to content

Commit

Permalink
version the container internally properly
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Nov 19, 2023
1 parent 5c435ea commit 6da9931
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,21 @@ RUN set -x && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*

COPY rootfs/ /
COPY version-nextgen /acarshub_version

RUN set -x && \
rm /acarshub_version && \
# find the latest version of acarshub from /webapp/static/js/acarshub.*.js
# it is in the format ACARS Hub: v0.0.0 Build 0000
# and we want to extract the version number and echo it out to /acarshub_version
# get the acarshub version from the js file along with the build number
ACARS_VERSION=$(grep -oP 'ACARS Hub: v\K[0-9\.]+' /webapp/static/js/acarshub.*.js) && \
ACARSHUB_BUILD=$(grep -oP 'ACARS Hub: v\K[0-9\.]+ Build \K[0-9]+' /webapp/static/js/acarshub.*.js) && \
# echo the version and build number to /acarshub_version
# check and see if we have a build number and version. If not, set it to 0
# This will be for local non-github versions
if [ -z "${ACARS_VERSION}" ]; then ACARS_VERSION="0.0.0"; fi && \
if [ -z "${ACARSHUB_BUILD}" ]; then ACARSHUB_BUILD="0"; fi && \
printf "v%s Build %s\nv%sBuild%s" "$ACARS_VERSION" "$ACARS_BUILD" "${ACARS_VERSION}" "$ACARS_BUILD" > /acarshub_version

EXPOSE 80
EXPOSE 5550
Expand Down
2 changes: 1 addition & 1 deletion acarshub-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acarshub-typescript",
"version": "3.3.1",
"version": "3.3.2",
"description": "Web front end for the docker-acarshub project",
"main": "index.js",
"repository": "https://github.com/sdr-enthusiasts/docker-acarshub",
Expand Down
2 changes: 1 addition & 1 deletion version-nextgen
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.3.1
v3.3.2

0 comments on commit 6da9931

Please sign in to comment.