From 7e362da1fb0b084b3b46f3e5b74b7d1fa59db918 Mon Sep 17 00:00:00 2001
From: Louis Vallat
Date: Thu, 16 Jun 2022 11:03:49 +0200
Subject: [PATCH] feat: added commit short sha to index page to check version
with corresponding git commit
Signed-off-by: Louis Vallat
---
.gitlab-ci.yml | 2 ++
src/index.html | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ea1a59f..282d8bf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,6 +20,7 @@ variables:
release:
stage: release
script:
+ - sed -i "s/__VERSION__/${CI_COMMIT_SHORT_SHA}/" src/index.html
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build . -t $CONTAINER_BRANCH_IMAGE
- docker push $CONTAINER_BRANCH_IMAGE
@@ -29,6 +30,7 @@ release:
release-master:
stage: release
script:
+ - sed -i "s/__VERSION__/${CI_COMMIT_SHORT_SHA}/" src/index.html
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build . -t $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
diff --git a/src/index.html b/src/index.html
index f8d9812..ee77ca8 100644
--- a/src/index.html
+++ b/src/index.html
@@ -235,7 +235,7 @@ PAGE CODED BY :
Design inspiré par ceci et ceci.
- Louis Vallat — 2022 — Made with ❤ and Open Source.
+ Louis Vallat — 2022 — Made with ❤ and Open Source — __VERSION__