From 7eacc27210b8ee2ac7f68d10e5dc6788f628e62f Mon Sep 17 00:00:00 2001 From: dorian-hode Date: Wed, 21 Jan 2026 16:15:56 +0100 Subject: [PATCH 1/4] Test with version in the frontend --- frontend/package.json | 2 +- frontend/src/App.tsx | 2 +- frontend/src/vite-env.d.ts | 1 + frontend/vite.config.ts | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index a0946957..e45e81f5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "0.0.0", + "version": "0.0.1", "type": "module", "scripts": { "dev": "vite --port 5175", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 986ff9bb..ff056b24 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -21,7 +21,7 @@ function App() { return (

- Where can I Park in Angers ? 👀 + Where can I Park in Angers ? 👀 {App.VERSION}

{ diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index 11f02fe2..28929cce 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -1 +1,2 @@ /// +declare const APP_VERSION: string; \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index ed788acb..b1a66785 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -20,4 +20,7 @@ export default defineConfig({ }, }, plugins: [react()], + define: { + APP_VERSION: JSON.stringify(process.env.npm_package_version), + }, }) From b04bcb18cce99951c02616deeba88225c2ccb199 Mon Sep 17 00:00:00 2001 From: dorian-hode Date: Wed, 21 Jan 2026 16:18:40 +0100 Subject: [PATCH 2/4] Test with version in the frontend 1 --- frontend/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ff056b24..1700e609 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -21,7 +21,7 @@ function App() { return (

- Where can I Park in Angers ? 👀 {App.VERSION} + Where can I Park in Angers ? 👀 {APP_VERSION}

{ From 2543dea3b7461a82950954404611b2251a26fe2c Mon Sep 17 00:00:00 2001 From: dorian-hode Date: Wed, 21 Jan 2026 16:42:56 +0100 Subject: [PATCH 3/4] Test with version in the frontend 2 --- .github/workflows/ci-cd-releases.yml | 10 ++++------ frontend/package-lock.json | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd-releases.yml b/.github/workflows/ci-cd-releases.yml index ba3c2b46..973f4ebd 100644 --- a/.github/workflows/ci-cd-releases.yml +++ b/.github/workflows/ci-cd-releases.yml @@ -34,7 +34,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: frontend-build - path: ./frontend + path: ./frontend/dist build_dotnet_app_release_backend_job: runs-on: ubuntu-latest @@ -57,7 +57,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: backend-build - path: ./backend + path: ./backend/ParkNDeploy.Api/publish deploy_infrastructure: runs-on: ubuntu-latest @@ -110,7 +110,6 @@ jobs: uses: actions/download-artifact@v5 with: name: frontend-build - path: ./frontend - name: Login to Azure uses: azure/login@v2 @@ -129,7 +128,7 @@ jobs: uses: azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ env.SWA_DEPLOYMENT_TOKEN }} - app_location: ./frontend + app_location: . action: upload skip_app_build: true skip_api_build: true @@ -147,7 +146,6 @@ jobs: uses: actions/download-artifact@v5 with: name: backend-build - path: ./backend - name: Login to Azure uses: azure/login@v2 @@ -160,4 +158,4 @@ jobs: uses: azure/webapps-deploy@v2 with: app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep - package: ./backend \ No newline at end of file + package: . \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f4a4f550..205ae800 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "frontend", - "version": "0.0.0", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "frontend", - "version": "0.0.0", + "version": "0.0.1", "dependencies": { "@radix-ui/react-icons": "^1.3.2", "@tanstack/react-query": "^5.84.1", From 4ee6c1c583d2acd8c9b9893b2aa8b3ff734719d9 Mon Sep 17 00:00:00 2001 From: dorian-hode Date: Wed, 21 Jan 2026 16:51:09 +0100 Subject: [PATCH 4/4] Test with version in the frontend 3 --- .github/workflows/ci-cd-releases.yml | 14 ++++++++------ frontend/src/App.tsx | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-cd-releases.yml b/.github/workflows/ci-cd-releases.yml index 973f4ebd..2b80a327 100644 --- a/.github/workflows/ci-cd-releases.yml +++ b/.github/workflows/ci-cd-releases.yml @@ -33,7 +33,7 @@ jobs: - name: 'Create and push the artifact' uses: actions/upload-artifact@v4 with: - name: frontend-build + name: frontend-artifact path: ./frontend/dist build_dotnet_app_release_backend_job: @@ -56,7 +56,7 @@ jobs: - name: 'Create and push the artifact' uses: actions/upload-artifact@v4 with: - name: backend-build + name: backend-artifact path: ./backend/ParkNDeploy.Api/publish deploy_infrastructure: @@ -109,7 +109,8 @@ jobs: - name: Download a single artifact uses: actions/download-artifact@v5 with: - name: frontend-build + name: frontend-artifact + path: ./frontend/dist - name: Login to Azure uses: azure/login@v2 @@ -128,7 +129,7 @@ jobs: uses: azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ env.SWA_DEPLOYMENT_TOKEN }} - app_location: . + app_location: frontend/dist action: upload skip_app_build: true skip_api_build: true @@ -145,7 +146,8 @@ jobs: - name: Download a single artifact uses: actions/download-artifact@v5 with: - name: backend-build + name: backend-artifact + path: ./backend/ParkNDeploy.Api/publish - name: Login to Azure uses: azure/login@v2 @@ -158,4 +160,4 @@ jobs: uses: azure/webapps-deploy@v2 with: app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep - package: . \ No newline at end of file + package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app \ No newline at end of file diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1700e609..34e9ae73 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -21,7 +21,7 @@ function App() { return (

- Where can I Park in Angers ? 👀 {APP_VERSION} + Where can I Park in Angers ? 👀

{ @@ -31,6 +31,7 @@ function App() { {isPending && } {isError && Something went wrong with the backend ...} {data && } +

App Version: {APP_VERSION}

); }