diff --git a/.env b/.env index e845466..749c50d 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -#VITE_SNAPSERVER_HOST = localhost:1780 +#VITE_APP_SNAPSERVER_HOST = localhost:1780 VITE_APP_VERSION=$npm_package_version VITE_APP_NAME=$npm_package_name diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 656c534..2594011 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 21 - name: Update npm run: npm install -g npm@latest @@ -40,7 +40,7 @@ jobs: env: GENERATE_SOURCEMAP: "false" run: | - echo REACT_APP_GITREV=\"${{ github.sha }}\" >> .env + echo VITE_APP_GITREV=\"${{ github.sha }}\" >> .env npm run build - name: Archive raw artifacts diff --git a/Makefile b/Makefile index c0bcff9..590af4a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build: npm run build clean: - rm -rf build + rm -rf dist install: - cd build && find . -type f -exec install -Dm 644 "{}" "$(DESTDIR)/usr/share/snapweb/{}" \; + cd dist && find . -type f -exec install -Dm 644 "{}" "$(DESTDIR)/usr/share/snapweb/{}" \; diff --git a/changelog.md b/changelog.md index e80c3b2..dbaa600 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,17 @@ # Snapweb changelog +## Version 0.7.0 + +### Features + +### Bugfixes + +### General + +- Switch from Create React App (deprecated) to Vite + +_Johannes Pohl Sat, 24 Feb 2024 00:13:37 +0200_ + ## Version 0.6.0 ### Features diff --git a/src/components/AboutDialog.tsx b/src/components/AboutDialog.tsx index ffe443a..fdedb01 100644 --- a/src/components/AboutDialog.tsx +++ b/src/components/AboutDialog.tsx @@ -1,6 +1,6 @@ import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material'; -const version = import.meta.env.VITE_APP_NAME_VERSION + (import.meta.env.VITE_APP_NAME_GITREV ? " (rev " + import.meta.env.VITE_APP_NAME_GITREV.substring(0, 8) + ")" : ""); +const version = import.meta.env.VITE_APP_VERSION + (import.meta.env.VITE_APP_GITREV ? " (rev " + import.meta.env.VITE_APP_GITREV.substring(0, 8) + ")" : ""); export default function AboutDialog(props: { open: boolean, onClose: () => void }) { return ( diff --git a/src/config.ts b/src/config.ts index f7919ba..42259c0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -const host = import.meta.env.VITE_SNAPSERVER_HOST || window.location.host; +const host = import.meta.env.VITE_APP_SNAPSERVER_HOST || window.location.host; const config = { baseUrl: (window.location.protocol === "https:" ? "wss://" : "ws://") + host,