Compare commits

..

3 commits

Author SHA1 Message Date
le king fu
b97a80d8b9 Release v0.4.2: Windows cross-compile via cargo-xwin + updater trampoline
Some checks failed
Release / build-and-release (push) Failing after 15m4s
- Add Windows cross-compile (cargo-xwin) to Forgejo CI workflow
- Add libsqlite3-sys bundled for cross-compile compatibility
- Switch updater endpoint from GitHub to self-hosted Forgejo
- Collect Windows NSIS assets and include windows-x86_64 in latest.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 20:23:25 -05:00
le king fu
21c4c73a62 Bump version to v0.4.1
Some checks failed
Release / build-and-release (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:57:13 -05:00
le king fu
d2a0ee65b3 Fix app stuck on spinner after v0.4.0 update (GH #9)
Restore seed_categories.sql to its original content so the migration 2
checksum matches existing databases. Move the level-3 insurance
subcategories (310-312) into a new migration 7 using INSERT OR IGNORE.
Add .catch() on connectActiveProfile() to surface DB errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:54:42 -05:00
8 changed files with 69 additions and 19 deletions

View file

@ -29,6 +29,13 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install -y build-essential libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf jq libssl-dev xdg-utils sudo apt-get install -y build-essential libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf jq libssl-dev xdg-utils
- name: Install Windows cross-compile dependencies
run: |
sudo apt-get install -y lld llvm clang nsis
source "$HOME/.cargo/env"
rustup target add x86_64-pc-windows-msvc
cargo install --locked cargo-xwin
- name: Install frontend dependencies - name: Install frontend dependencies
run: npm ci run: npm ci
@ -40,6 +47,14 @@ jobs:
source "$HOME/.cargo/env" source "$HOME/.cargo/env"
npx tauri build npx tauri build
- name: Build Tauri Windows
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
source "$HOME/.cargo/env"
npx tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc --bundles nsis
- name: Collect release files - name: Collect release files
run: | run: |
mkdir -p release-assets mkdir -p release-assets
@ -48,6 +63,8 @@ jobs:
cp src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz.sig release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz.sig release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/rpm/*.rpm release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/rpm/*.rpm release-assets/ 2>/dev/null || true
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe release-assets/ 2>/dev/null || true
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe.sig release-assets/ 2>/dev/null || true
ls -la release-assets/ ls -la release-assets/
- name: Extract changelog - name: Extract changelog
@ -73,6 +90,8 @@ jobs:
LINUX_SIG="" LINUX_SIG=""
APPIMAGE_TAR="" APPIMAGE_TAR=""
WINDOWS_SIG=""
WINDOWS_EXE=""
for f in release-assets/*.AppImage.tar.gz.sig; do for f in release-assets/*.AppImage.tar.gz.sig; do
[ -f "$f" ] && LINUX_SIG=$(cat "$f") [ -f "$f" ] && LINUX_SIG=$(cat "$f")
@ -80,6 +99,12 @@ jobs:
for f in release-assets/*.AppImage.tar.gz; do for f in release-assets/*.AppImage.tar.gz; do
[ -f "$f" ] && APPIMAGE_TAR=$(basename "$f") [ -f "$f" ] && APPIMAGE_TAR=$(basename "$f")
done done
for f in release-assets/*-setup.exe.sig; do
[ -f "$f" ] && WINDOWS_SIG=$(cat "$f")
done
for f in release-assets/*-setup.exe; do
[ -f "$f" ] && WINDOWS_EXE=$(basename "$f")
done
PLATFORMS="{}" PLATFORMS="{}"
if [ -n "$LINUX_SIG" ] && [ -n "$APPIMAGE_TAR" ]; then if [ -n "$LINUX_SIG" ] && [ -n "$APPIMAGE_TAR" ]; then
@ -88,6 +113,12 @@ jobs:
--arg url "${BASE_URL}/${APPIMAGE_TAR}" \ --arg url "${BASE_URL}/${APPIMAGE_TAR}" \
'. + {"linux-x86_64": {"signature": $sig, "url": $url}}') '. + {"linux-x86_64": {"signature": $sig, "url": $url}}')
fi fi
if [ -n "$WINDOWS_SIG" ] && [ -n "$WINDOWS_EXE" ]; then
PLATFORMS=$(echo "$PLATFORMS" | jq \
--arg sig "$WINDOWS_SIG" \
--arg url "${BASE_URL}/${WINDOWS_EXE}" \
'. + {"windows-x86_64": {"signature": $sig, "url": $url}}')
fi
jq -n \ jq -n \
--arg version "$TAG" \ --arg version "$TAG" \
@ -115,6 +146,7 @@ jobs:
## Installation ## Installation
**Windows** : Téléchargez le fichier `.exe` ci-dessous.
**Linux** : Téléchargez le fichier `.deb` ou `.AppImage` ci-dessous. **Linux** : Téléchargez le fichier `.deb` ou `.AppImage` ci-dessous.
BODY_EOF BODY_EOF
) )

View file

@ -2,6 +2,18 @@
## [Unreleased] ## [Unreleased]
## [0.4.2]
### Changed
- Auto-updater now points to self-hosted Forgejo instance
- Windows builds now cross-compiled via cargo-xwin
## [0.4.1]
### Fixed
- App stuck on infinite spinner after updating from v0.3.x (migration checksum mismatch on seed_categories.sql)
- DB connection errors now logged to console instead of silently failing
## [0.4.0] ## [0.4.0]
### Added ### Added

View file

@ -1,7 +1,7 @@
{ {
"name": "simpl_result_scaffold", "name": "simpl_result_scaffold",
"private": true, "private": true,
"version": "0.4.0", "version": "0.4.2",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "simpl-result" name = "simpl-result"
version = "0.4.0" version = "0.4.2"
description = "Personal finance management app" description = "Personal finance management app"
authors = ["you"] authors = ["you"]
edition = "2021" edition = "2021"
@ -24,6 +24,7 @@ tauri-plugin-sql = { version = "2", features = ["sqlite"] }
tauri-plugin-dialog = "2" tauri-plugin-dialog = "2"
tauri-plugin-updater = "2" tauri-plugin-updater = "2"
tauri-plugin-process = "2" tauri-plugin-process = "2"
libsqlite3-sys = { version = "0.30", features = ["bundled"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
sha2 = "0.10" sha2 = "0.10"

View file

@ -35,7 +35,7 @@ INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (27
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (28, 'Transport en commun', 2, 'expense', '#3b82f6', 9); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (28, 'Transport en commun', 2, 'expense', '#3b82f6', 9);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (29, 'Internet & Télécom', 2, 'expense', '#6366f1', 10); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (29, 'Internet & Télécom', 2, 'expense', '#6366f1', 10);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (30, 'Animaux', 2, 'expense', '#a855f7', 11); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (30, 'Animaux', 2, 'expense', '#a855f7', 11);
INSERT INTO categories (id, name, parent_id, type, color, sort_order, is_inputable) VALUES (31, 'Assurances', 2, 'expense', '#14b8a6', 12, 0); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (31, 'Assurances', 2, 'expense', '#14b8a6', 12);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (32, 'Pharmacie', 2, 'expense', '#f43f5e', 13); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (32, 'Pharmacie', 2, 'expense', '#f43f5e', 13);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (33, 'Taxes municipales', 2, 'expense', '#78716c', 14); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (33, 'Taxes municipales', 2, 'expense', '#78716c', 14);
@ -68,13 +68,6 @@ INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (71
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (72, 'Retrait cash', 6, 'expense', '#57534e', 3); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (72, 'Retrait cash', 6, 'expense', '#57534e', 3);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (73, 'Projets', 6, 'expense', '#0ea5e9', 4); INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (73, 'Projets', 6, 'expense', '#0ea5e9', 4);
-- ==========================================
-- Grandchild categories (Level 3 — under Assurances)
-- ==========================================
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (310, 'Assurance-auto', 31, 'expense', '#14b8a6', 1);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (311, 'Assurance-habitation', 31, 'expense', '#0d9488', 2);
INSERT INTO categories (id, name, parent_id, type, color, sort_order) VALUES (312, 'Assurance-vie', 31, 'expense', '#0f766e', 3);
-- ========================================== -- ==========================================
-- Keywords -- Keywords
-- ========================================== -- ==========================================
@ -139,12 +132,10 @@ INSERT INTO keywords (keyword, category_id) VALUES ('ORICOM', 29);
-- Animaux (30) -- Animaux (30)
INSERT INTO keywords (keyword, category_id) VALUES ('MONDOU', 30); INSERT INTO keywords (keyword, category_id) VALUES ('MONDOU', 30);
-- Assurance-auto (310) -- Assurances (31)
INSERT INTO keywords (keyword, category_id) VALUES ('BELAIR', 310); INSERT INTO keywords (keyword, category_id) VALUES ('BELAIR', 31);
-- Assurance-habitation (311) INSERT INTO keywords (keyword, category_id) VALUES ('PRYSM', 31);
INSERT INTO keywords (keyword, category_id) VALUES ('PRYSM', 311); INSERT INTO keywords (keyword, category_id) VALUES ('INS/ASS', 31);
-- Assurance-vie (312)
INSERT INTO keywords (keyword, category_id) VALUES ('INS/ASS', 312);
-- Pharmacie (32) -- Pharmacie (32)
INSERT INTO keywords (keyword, category_id) VALUES ('JEAN COUTU', 32); INSERT INTO keywords (keyword, category_id) VALUES ('JEAN COUTU', 32);

View file

@ -67,6 +67,18 @@ pub fn run() {
ALTER TABLE imported_files_new RENAME TO imported_files;", ALTER TABLE imported_files_new RENAME TO imported_files;",
kind: MigrationKind::Up, kind: MigrationKind::Up,
}, },
Migration {
version: 7,
description: "add level-3 insurance subcategories",
sql: "INSERT OR IGNORE INTO categories (id, name, parent_id, type, color, sort_order) VALUES (310, 'Assurance-auto', 31, 'expense', '#14b8a6', 1);
INSERT OR IGNORE INTO categories (id, name, parent_id, type, color, sort_order) VALUES (311, 'Assurance-habitation', 31, 'expense', '#0d9488', 2);
INSERT OR IGNORE INTO categories (id, name, parent_id, type, color, sort_order) VALUES (312, 'Assurance-vie', 31, 'expense', '#0f766e', 3);
UPDATE categories SET is_inputable = 0 WHERE id = 31;
UPDATE keywords SET category_id = 310 WHERE keyword = 'BELAIR' AND category_id = 31;
UPDATE keywords SET category_id = 311 WHERE keyword = 'PRYSM' AND category_id = 31;
UPDATE keywords SET category_id = 312 WHERE keyword = 'INS/ASS' AND category_id = 31;",
kind: MigrationKind::Up,
},
]; ];
tauri::Builder::default() tauri::Builder::default()

View file

@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Simpl Resultat", "productName": "Simpl Resultat",
"version": "0.4.0", "version": "0.4.2",
"identifier": "com.simpl.resultat", "identifier": "com.simpl.resultat",
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",
@ -37,7 +37,7 @@
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDgyRDc4MDEyQjQ0MzAxRTMKUldUakFVTzBFb0RYZ3NRNmFxMHdnTzBMZzFacTlCbTdtMEU3Ym5pZWNSN3FRZk43R3lZSUM2OHQK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDgyRDc4MDEyQjQ0MzAxRTMKUldUakFVTzBFb0RYZ3NRNmFxMHdnTzBMZzFacTlCbTdtMEU3Ym5pZWNSN3FRZk43R3lZSUM2OHQK",
"endpoints": [ "endpoints": [
"https://github.com/Le-King-Fu/simpl-resultat/releases/latest/download/latest.json" "https://git.lacompagniemaximus.com/maximus/simpl-resultat/releases/latest/download/latest.json"
], ],
"windows": { "windows": {
"installMode": "basicUi" "installMode": "basicUi"

View file

@ -20,7 +20,9 @@ export default function App() {
useEffect(() => { useEffect(() => {
if (activeProfile && !isLoading) { if (activeProfile && !isLoading) {
setDbReady(false); setDbReady(false);
connectActiveProfile().then(() => setDbReady(true)); connectActiveProfile()
.then(() => setDbReady(true))
.catch((err) => console.error("Failed to connect profile:", err));
} }
}, [activeProfile, isLoading, connectActiveProfile]); }, [activeProfile, isLoading, connectActiveProfile]);