Skip to content

Commit

Permalink
Adapt CI to use vite
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Mar 9, 2024
1 parent b7fc3a3 commit ab9f30d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/{}" \;
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Snapweb changelog

## Version 0.7.0

### Features

### Bugfixes

### General

- Switch from Create React App (deprecated) to Vite

_Johannes Pohl <snapweb@badaix.de> Sat, 24 Feb 2024 00:13:37 +0200_

## Version 0.6.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion src/components/AboutDialog.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit ab9f30d

Please sign in to comment.