mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-12 15:25:49 +00:00
add commit hash with link to github into frontend
This commit is contained in:
parent
32205dc798
commit
db020da387
1
.env.shell
Normal file
1
.env.shell
Normal file
@ -0,0 +1 @@
|
||||
BUILD_COMMIT="$(git rev-parse HEAD)"
|
||||
@ -2,7 +2,9 @@
|
||||
# For that to work, node v12.19.0 needs to be installed with nvm for root
|
||||
# or NPM_BIN Path and NVM_DIR must be adjusted
|
||||
|
||||
cd /var/www/html/gradido/frontend
|
||||
cd /var/www/html/gradido
|
||||
eval "echo \"$(cat .env.shell)\"" > .env
|
||||
cd frontend
|
||||
|
||||
NPM_BIN=/root/.nvm/versions/node/v12.19.0/bin/npm
|
||||
|
||||
|
||||
@ -15,6 +15,9 @@
|
||||
<a href="https://github.com/gradido/gradido/releases/latest" target="_blank">
|
||||
App version {{ version }}
|
||||
</a>
|
||||
<a :href="'https://github.com/gradido/gradido/commit/' + hash" target="_blank">
|
||||
{{ shortHash }}
|
||||
</a>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
@ -59,6 +62,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.substr(0, 8),
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
const path = require('path')
|
||||
const dotenv = require('dotenv-webpack')
|
||||
|
||||
process.env.VUE_APP_BUILD_COMMIT = process.env.BUILD_COMMIT
|
||||
|
||||
// vue.config.js
|
||||
module.exports = {
|
||||
devServer: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user