Add logging frontend version to console on startup

This commit is contained in:
kolaente 2020-05-09 21:39:46 +02:00
parent 48df1a44e8
commit 8789135eed
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
4 changed files with 9 additions and 0 deletions

View file

@ -38,6 +38,7 @@ steps:
commands: commands:
- yarn --frozen-lockfile - yarn --frozen-lockfile
- yarn run lint - yarn run lint
- echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > version.json
- yarn run build - yarn run build
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
@ -112,6 +113,7 @@ steps:
commands: commands:
- yarn --frozen-lockfile - yarn --frozen-lockfile
- yarn run lint - yarn run lint
- echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > version.json
- yarn run build - yarn run build
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing

View file

@ -8,6 +8,7 @@ COPY . ./
RUN \ RUN \
# Build the frontend # Build the frontend
yarn install --frozen-lockfile && \ yarn install --frozen-lockfile && \
echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > version.json && \
yarn run build yarn run build
# Stage 2: copy # Stage 2: copy

View file

@ -2,6 +2,9 @@ import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import {VERSION} from './version.json'
console.info(`Vikunja frontend version ${VERSION}`)
// Register the modal // Register the modal
import Modal from './components/modal/Modal' import Modal from './components/modal/Modal'
Vue.component('modal', Modal) Vue.component('modal', Modal)

3
src/version.json Normal file
View file

@ -0,0 +1,3 @@
{
"VERSION": "0.12"
}