chore: only use api version as it is coming from the same codebase

This commit is contained in:
kolaente 2024-02-08 23:13:20 +01:00
parent aab36eb89c
commit 4a66c2202f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
6 changed files with 3 additions and 22 deletions

View File

@ -999,7 +999,6 @@ steps:
- corepack enable && pnpm config set store-dir .cache/pnpm - corepack enable && pnpm config set store-dir .cache/pnpm
- pnpm install --fetch-timeout 100000 --frozen-lockfile - pnpm install --fetch-timeout 100000 --frozen-lockfile
- pnpm run lint - 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 - 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 - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
# depends_on: # depends_on:
@ -1010,7 +1009,6 @@ steps:
pull: always pull: always
commands: commands:
- cd frontend - cd frontend
- cp src/version.json dist
- cd dist - cd dist
- zip -r ../vikunja-frontend-unstable.zip * - zip -r ../vikunja-frontend-unstable.zip *
- cd .. - cd ..
@ -1082,8 +1080,6 @@ steps:
- apk add git - apk add git
- corepack enable && pnpm config set store-dir .cache/pnpm - corepack enable && pnpm config set store-dir .cache/pnpm
- pnpm install --fetch-timeout 100000 --frozen-lockfile - 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 - 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 - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
# depends_on: # depends_on:
@ -1094,10 +1090,8 @@ steps:
pull: always pull: always
commands: commands:
- cd frontend - cd frontend
- cp src/version.json dist
- cd dist - cd dist
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip * - zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
- cd ..
depends_on: [ build ] depends_on: [ build ]
- name: release - name: release
@ -1501,6 +1495,6 @@ steps:
# - mc cp ./dist/*.dmg.blockmap scw-fr-par/vikunja-releases/desktop/$VERSION/ # - mc cp ./dist/*.dmg.blockmap scw-fr-par/vikunja-releases/desktop/$VERSION/
--- ---
kind: signature kind: signature
hmac: 07f6ab6787f479c4bd83c7f0c3097de37d10fd18b1b37a3a0b2a8db012d244cb hmac: a52540e02a2061e83407dc2e7d4a8af684b98ed18a833de55307994e513e2aee
... ...

View File

@ -28,7 +28,6 @@ RUN if [ "$USE_RELEASE" != true ]; then \
apk add --no-cache --virtual .build-deps git jq && \ apk add --no-cache --virtual .build-deps git jq && \
git describe --tags --always --abbrev=10 | sed 's/-/+/; s/^v//; s/-g/-/' | \ git describe --tags --always --abbrev=10 | sed 's/-/+/; s/^v//; s/-g/-/' | \
xargs -0 -I{} jq -Mcnr --arg version {} '{VERSION:$version}' | \ xargs -0 -I{} jq -Mcnr --arg version {} '{VERSION:$version}' | \
tee src/version.json && \
apk del .build-deps; \ apk del .build-deps; \
fi fi

View File

@ -1093,8 +1093,7 @@
}, },
"about": { "about": {
"title": "About", "title": "About",
"frontendVersion": "Frontend Version: {version}", "version": "Version: {version}"
"apiVersion": "API Version: {version}"
}, },
"time": { "time": {
"units": { "units": {

View File

@ -5,7 +5,6 @@ import pinia from './pinia'
import router from './router' import router from './router'
import App from './App.vue' import App from './App.vue'
import {error, success} from './message' import {error, success} from './message'
import {VERSION} from './version.json'
// Notifications // Notifications
import Notifications from '@kyvg/vue3-notification' 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 // Check if we have an api url in local storage and use it if that's the case
const apiUrlFromStorage = localStorage.getItem('API_URL') const apiUrlFromStorage = localStorage.getItem('API_URL')
if (apiUrlFromStorage !== null) { if (apiUrlFromStorage !== null) {

View File

@ -13,10 +13,7 @@
> >
<div class="p-4"> <div class="p-4">
<p> <p>
{{ $t('about.frontendVersion', {version: frontendVersion}) }} {{ $t('about.version', {version: apiVersion}) }}
</p>
<p>
{{ $t('about.apiVersion', {version: apiVersion}) }}
</p> </p>
</div> </div>
<template #footer> <template #footer>
@ -34,10 +31,8 @@
<script setup lang="ts"> <script setup lang="ts">
import {computed} from 'vue' import {computed} from 'vue'
import {VERSION} from '@/version.json'
import {useConfigStore} from '@/stores/config' import {useConfigStore} from '@/stores/config'
const configStore = useConfigStore() const configStore = useConfigStore()
const apiVersion = computed(() => configStore.version) const apiVersion = computed(() => configStore.version)
const frontendVersion = VERSION
</script> </script>

View File

@ -19,8 +19,6 @@ import postcssEasingGradients from 'postcss-easing-gradients'
const pathSrc = fileURLToPath(new URL('./src', import.meta.url)) const pathSrc = fileURLToPath(new URL('./src', import.meta.url))
import {VERSION} from './src/version.json'
// the @use rules have to be the first in the compiled stylesheets // the @use rules have to be the first in the compiled stylesheets
const PREFIXED_SCSS_STYLES = `@use "sass:math"; const PREFIXED_SCSS_STYLES = `@use "sass:math";
@import "${pathSrc}/styles/common-imports";` @import "${pathSrc}/styles/common-imports";`
@ -46,7 +44,6 @@ function getSentryConfig(env: ImportMetaEnv): ViteSentryPluginOptions {
authToken: env.SENTRY_AUTH_TOKEN, authToken: env.SENTRY_AUTH_TOKEN,
org: env.SENTRY_ORG, org: env.SENTRY_ORG,
project: env.SENTRY_PROJECT, project: env.SENTRY_PROJECT,
release: VERSION,
cleanSourcemapsAfterUpload: true, cleanSourcemapsAfterUpload: true,
legacyErrorHandlingMode: true, legacyErrorHandlingMode: true,
deploy: { deploy: {