Skip to content

Commit

Permalink
UI: display git hash and build timestamp in the footer
Browse files Browse the repository at this point in the history
  • Loading branch information
lwitkowski committed Jul 30, 2024
1 parent 761bc3b commit 95d1568
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
38 changes: 37 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"webpack": "^5.93.0"
},
"devDependencies": {
"@vue/cli-service": "^5.0.8"
"@vue/cli-service": "^5.0.8",
"git-describe": "^4.1.1"
},
"browserslist": [
"> 1%",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
</template>
</v-select>
</div>

</div>
<div id="body">
<Toast />
<router-view :key="$route.path" />
</div>
<div id="footer">{{ buildInfo }}</div>
</div>
</template>

Expand Down Expand Up @@ -237,6 +239,7 @@ export default {
return {
options: [],
selected: '',
buildInfo: 'Build: v.' + process.env.VUE_APP_GIT_HASH + ", " + process.env.VUE_APP_BUILD_TIMESTAMP
};
},
Expand Down
1 change: 1 addition & 0 deletions frontend/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { defineConfig } = require('@vue/cli-service')
const {gitDescribe, gitDescribeSync} = require('git-describe');

process.env.VUE_APP_GIT_HASH = gitDescribeSync().hash
process.env.VUE_APP_BUILD_TIMESTAMP = new Date().toISOString()

module.exports = defineConfig({
devServer: {
Expand Down

0 comments on commit 95d1568

Please sign in to comment.