From f094c2ef74267f2249f29c6e02e2780a95c29b25 Mon Sep 17 00:00:00 2001 From: Thibaut Gauvin Date: Mon, 24 Jun 2024 13:34:27 +0200 Subject: [PATCH] feat(ui): display app version in report navbar --- .github/workflows/release.yml | 1 + Makefile | 1 + client/package-lock.json | 4 ++-- client/package.json | 2 +- client/src/routes/+layout.svelte | 17 +++++++++++++++++ client/svelte.config.js | 4 ++++ 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77df17aed..86cc4443e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,7 @@ jobs: - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version-file: 'client/.nvmrc' + - run: sed -i 's/unreleased/${{ github.ref_name }}/' client/package.json - run: NODE_ENV=CI npm -C client install - run: NODE_ENV=production npm -C client run build diff --git a/Makefile b/Makefile index 506373a02..16b8c5082 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ fmt: ## Run `go fmt` on all files client.artifact: ## Build client artifact (Svelte static site) rm -rf client/build + # sed -i 's/unreleased/$(shell git describe --tags --abbrev=0)-next/' client/package.json NODE_ENV=CI npm -C client install NODE_ENV=production npm -C client run build diff --git a/client/package-lock.json b/client/package-lock.json index d5d4f1135..5db0bd843 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "dib-client", - "version": "0.0.1", + "version": "unreleased", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dib-client", - "version": "0.0.1", + "version": "unreleased", "devDependencies": { "@sveltejs/adapter-static": "^3.0.2", "@sveltejs/kit": "^2.0.0", diff --git a/client/package.json b/client/package.json index efadff3fe..ef10f3856 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "dib-client", - "version": "0.0.1", + "version": "unreleased", "private": true, "scripts": { "dev": "vite dev", diff --git a/client/src/routes/+layout.svelte b/client/src/routes/+layout.svelte index 63f5ea0ec..337fe4ab2 100644 --- a/client/src/routes/+layout.svelte +++ b/client/src/routes/+layout.svelte @@ -1,4 +1,5 @@