From a1db1153368a42daf921e3dc5fb8c4a8bf1c0761 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Fri, 10 Sep 2021 15:38:05 +0200 Subject: [PATCH] encapsulate --- frontend/src/config/index.js | 1 + frontend/src/views/Layout/ContentFooter.vue | 7 ++----- frontend/vue.config.js | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js index dd35eb185..fbef2abbb 100644 --- a/frontend/src/config/index.js +++ b/frontend/src/config/index.js @@ -20,6 +20,7 @@ const CONFIG = { ...environment, ...server, APP_VERSION: pkg.version, + COMMIT_HASH: process.env.VUE_APP_BUILD_COMMIT, } export default CONFIG diff --git a/frontend/src/views/Layout/ContentFooter.vue b/frontend/src/views/Layout/ContentFooter.vue index 97c27230f..c18608545 100755 --- a/frontend/src/views/Layout/ContentFooter.vue +++ b/frontend/src/views/Layout/ContentFooter.vue @@ -66,11 +66,8 @@ export default { return { year: new Date().getFullYear(), version: CONFIG.APP_VERSION, - hash: process.env.VUE_APP_BUILD_COMMIT, - shortHash: - process.env.VUE_APP_BUILD_COMMIT !== undefined - ? process.env.VUE_APP_BUILD_COMMIT.substr(0, 8) - : '00000000', + hash: CONFIG.COMMIT_HASH, + shortHash: CONFIG.COMMIT_HASH.substr(0, 8), } }, } diff --git a/frontend/vue.config.js b/frontend/vue.config.js index 5a8495cc2..79917948c 100644 --- a/frontend/vue.config.js +++ b/frontend/vue.config.js @@ -1,7 +1,7 @@ const path = require('path') const dotenv = require('dotenv-webpack') -process.env.VUE_APP_BUILD_COMMIT = process.env.BUILD_COMMIT || '000000000' +process.env.VUE_APP_BUILD_COMMIT = process.env.BUILD_COMMIT || '00000000' // vue.config.js module.exports = {