mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add commit hash with link to github into frontend
This commit is contained in:
parent
6f28b257c5
commit
980e6e0a1c
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
|
# 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
|
# 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
|
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">
|
<a href="https://github.com/gradido/gradido/releases/latest" target="_blank">
|
||||||
App version {{ version }}
|
App version {{ version }}
|
||||||
</a>
|
</a>
|
||||||
|
<a :href="'https://github.com/gradido/gradido/commit/' + hash" target="_blank">
|
||||||
|
{{ shortHash }}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@ -59,6 +62,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
version: CONFIG.APP_VERSION,
|
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 path = require('path')
|
||||||
const dotenv = require('dotenv-webpack')
|
const dotenv = require('dotenv-webpack')
|
||||||
|
|
||||||
|
process.env.VUE_APP_BUILD_COMMIT = process.env.BUILD_COMMIT
|
||||||
|
|
||||||
// vue.config.js
|
// vue.config.js
|
||||||
module.exports = {
|
module.exports = {
|
||||||
devServer: {
|
devServer: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user