Desktop-managed local server that updates with the app - #30
Merged
Merged
Conversation
- File > Run GitGood server in the background (Linux, packaged): installs a systemd user service that runs the server bundled in this app via ELECTRON_RUN_AS_NODE, copies this desktop's settings/repositories into an empty server data dir, and switches the desktop to client mode. - On every client-mode launch the desktop rewrites that unit to point at itself (AppImage updates rename the file) and restarts the server when the unit changed or its version differs. Units from npm run install:service are never touched. - The desktop runs its own updater in client mode (it had none), answering app.update.* natively, so updating the desktop updates the server. - The version-mismatch dialog offers an action: Restart server (managed), Copy command (checkout), Reload (remote), or Check for updates (desktop older).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the "GitGood 0.2.0 is connected to a GitGood server running 0.1.5" situation: a local server now updates with the desktop app, and the mismatch warning offers a way to fix it.
ELECTRON_RUN_AS_NODE). If the server's data folder is empty, it first copies this desktop's settings and repositories there, then switches the desktop to client mode. Asks before replacing an existing service from a source checkout.npm run install:serviceare never touched.app.update.*natively, so updating the desktop also updates a managed server.Notes
-- --no-sandbox: the AppImage launcher adds--no-sandboxon systems without unprivileged user namespaces, which Electron's Node mode rejects; with it already present after--, the launcher adds nothing and Node ignores it.Testing
npm run typecheckclean;npm test1119 passed, 4 skipped;npm run test:smoke35/35--no-sandboxhandling, quoting of paths with spaces and%)/version0.2.0); launching a different AppImage in client mode rewrote the unit to point at itself and restarted the service, and the desktop's own update check ranNot verified: the menu setup flow (dialogs, settings copy, relaunch) and the mismatch-dialog buttons were not driven interactively.