diff --git a/k8s/local/explorer-ui/image.yaml b/k8s/local/explorer-ui/image.yaml index 1b049fc3..2214346b 100644 --- a/k8s/local/explorer-ui/image.yaml +++ b/k8s/local/explorer-ui/image.yaml @@ -15,6 +15,7 @@ build: VITE_DISCORD_URL: "https://discord.gg/obscura-network" VITE_X_URL: "https://x.com/Obscura_Network" VITE_GITHUB_URL: "https://github.com/aztlan-labs/chicmoz" + VITE_VERSION_STRING: "{{.VERSION_STRING}}" requires: - image: chicmoz-base alias: BASE diff --git a/scripts/production/deploy.sh b/scripts/production/deploy.sh index f5d9b116..6d0a6cf4 100755 --- a/scripts/production/deploy.sh +++ b/scripts/production/deploy.sh @@ -2,4 +2,4 @@ set -e -skaffold run --filename "k8s/production/skaffold.production.light.yaml" --default-repo=registry.digitalocean.com/aztlan-containers +VERSION_STRING="$(scripts/set_version_string.sh) skaffold run --filename "k8s/production/skaffold.production.light.yaml" --default-repo=registry.digitalocean.com/aztlan-containers diff --git a/scripts/set_version_string.sh b/scripts/set_version_string.sh new file mode 100755 index 00000000..78630fa6 --- /dev/null +++ b/scripts/set_version_string.sh @@ -0,0 +1,9 @@ +#!/bin/sh +GIT_TAG=$(git describe --tags --abbrev=0) +GIT_COMMIT=$(git rev-parse --short HEAD) +if git diff --quiet; then + UNCOMMITTED_CHANGES="" +else + UNCOMMITTED_CHANGES="-DIRTY" +fi +echo "${GIT_TAG}-${GIT_COMMIT}${UNCOMMITTED_CHANGES}" diff --git a/services/explorer-ui/Dockerfile b/services/explorer-ui/Dockerfile index 3935a311..4b6a0725 100644 --- a/services/explorer-ui/Dockerfile +++ b/services/explorer-ui/Dockerfile @@ -23,6 +23,9 @@ ENV VITE_GITHUB_URL $VITE_GITHUB_URL ARG VITE_X_URL ENV VITE_X_URL $VITE_X_URL +ARG VITE_VERSION_STRING +ENV VITE_VERSION_STRING $VITE_VERSION_STRING + RUN yarn workspaces focus @chicmoz/explorer-ui FROM deps as build diff --git a/services/explorer-ui/src/pages/dev.tsx b/services/explorer-ui/src/pages/dev.tsx index 3341039d..4cafc882 100644 --- a/services/explorer-ui/src/pages/dev.tsx +++ b/services/explorer-ui/src/pages/dev.tsx @@ -1,4 +1,5 @@ import { type FC } from "react"; +import { VERSION_STRING } from "~/service/constants"; export const DevPage: FC = () => { return ( @@ -6,6 +7,7 @@ export const DevPage: FC = () => {
Aztec.js version : 0.67.0
+Chicmoz version: {VERSION_STRING}