From 4a66c2202fe8f5cc5cb51c9ce50227d31b5a02be Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 8 Feb 2024 23:13:20 +0100 Subject: [PATCH] chore: only use api version as it is coming from the same codebase --- .drone.yml | 8 +------- frontend/Dockerfile | 1 - frontend/src/i18n/lang/en.json | 3 +-- frontend/src/main.ts | 3 --- frontend/src/views/About.vue | 7 +------ frontend/vite.config.ts | 3 --- 6 files changed, 3 insertions(+), 22 deletions(-) diff --git a/.drone.yml b/.drone.yml index 059ef6e18c..e61abab5a1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -999,7 +999,6 @@ steps: - corepack enable && pnpm config set store-dir .cache/pnpm - pnpm install --fetch-timeout 100000 --frozen-lockfile - pnpm run lint - - "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json" - pnpm run build - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing # depends_on: @@ -1010,7 +1009,6 @@ steps: pull: always commands: - cd frontend - - cp src/version.json dist - cd dist - zip -r ../vikunja-frontend-unstable.zip * - cd .. @@ -1082,8 +1080,6 @@ steps: - apk add git - corepack enable && pnpm config set store-dir .cache/pnpm - pnpm install --fetch-timeout 100000 --frozen-lockfile - - pnpm run lint - - "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json" - pnpm run build - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing # depends_on: @@ -1094,10 +1090,8 @@ steps: pull: always commands: - cd frontend - - cp src/version.json dist - cd dist - zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip * - - cd .. depends_on: [ build ] - name: release @@ -1501,6 +1495,6 @@ steps: # - mc cp ./dist/*.dmg.blockmap scw-fr-par/vikunja-releases/desktop/$VERSION/ --- kind: signature -hmac: 07f6ab6787f479c4bd83c7f0c3097de37d10fd18b1b37a3a0b2a8db012d244cb +hmac: a52540e02a2061e83407dc2e7d4a8af684b98ed18a833de55307994e513e2aee ... diff --git a/frontend/Dockerfile b/frontend/Dockerfile index c608044a83..4b65422016 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -28,7 +28,6 @@ RUN if [ "$USE_RELEASE" != true ]; then \ apk add --no-cache --virtual .build-deps git jq && \ git describe --tags --always --abbrev=10 | sed 's/-/+/; s/^v//; s/-g/-/' | \ xargs -0 -I{} jq -Mcnr --arg version {} '{VERSION:$version}' | \ - tee src/version.json && \ apk del .build-deps; \ fi diff --git a/frontend/src/i18n/lang/en.json b/frontend/src/i18n/lang/en.json index e35c6be9bc..43fd23ac63 100644 --- a/frontend/src/i18n/lang/en.json +++ b/frontend/src/i18n/lang/en.json @@ -1093,8 +1093,7 @@ }, "about": { "title": "About", - "frontendVersion": "Frontend Version: {version}", - "apiVersion": "API Version: {version}" + "version": "Version: {version}" }, "time": { "units": { diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 99fb53fb45..e5d288c83d 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -5,7 +5,6 @@ import pinia from './pinia' import router from './router' import App from './App.vue' import {error, success} from './message' -import {VERSION} from './version.json' // Notifications import Notifications from '@kyvg/vue3-notification' @@ -27,8 +26,6 @@ declare global { } } -console.info(`Vikunja frontend version ${VERSION}`) - // Check if we have an api url in local storage and use it if that's the case const apiUrlFromStorage = localStorage.getItem('API_URL') if (apiUrlFromStorage !== null) { diff --git a/frontend/src/views/About.vue b/frontend/src/views/About.vue index 7095daa2f7..a8f259796f 100644 --- a/frontend/src/views/About.vue +++ b/frontend/src/views/About.vue @@ -13,10 +13,7 @@ >

- {{ $t('about.frontendVersion', {version: frontendVersion}) }} -

-

- {{ $t('about.apiVersion', {version: apiVersion}) }} + {{ $t('about.version', {version: apiVersion}) }}