Skip to content

Add versioned releases, self-update, installer polish, and a test suite - #1

Open
cr2007 wants to merge 4 commits into
mainfrom
overall-improvements
Open

Add versioned releases, self-update, installer polish, and a test suite#1
cr2007 wants to merge 4 commits into
mainfrom
overall-improvements

Conversation

@cr2007

@cr2007 cr2007 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add dependency-checked install.sh, a new uninstall.sh (with --purge), and a release.yml GitHub Actions workflow that publishes a GitHub Release when a vX.Y.Z tag matching gitscrnsvr's embedded VERSION is pushed.
  • Add gitscrnsvr version/update commands (self-updates from the latest GitHub release), move settings out of the installed script into ~/.config/gitscrnsvr/config.env, and replace the hardcoded gitlogue path with find_gitlogue(), which checks PATH and every install location gitlogue's own docs describe.
  • Fix a real bug: the daemon's idle timer ran independently of GNOME's actual lock state, so it could launch a second gitlogue instance behind an already-locked screen. is_screen_locked() now guards against that, and kill_screensaver() polls instead of a flat 1s sleep so the old window closes faster.
  • Restructure gitscrnsvr around main()/validate_environment()/run_daemon() so it can be sourced for tests without running the daemon loop, and extract pure parsing helpers (idle/lock-reply parsing, version comparison, release-tag parsing) from their D-Bus/network I/O.
  • Add a dependency-free regression suite under tests/ (pure-function parsing, find_gitlogue detection, CLI surface, install.sh/uninstall.sh behavior against scratch HOME dirs with systemctl stubbed out) and a test.yml CI workflow to run it on every push/PR.
  • Document all of the above in the README (install/config/update/uninstall/release/testing).

Test plan

  • tests/run_all.sh passes locally (33/33 assertions)
  • install.sh/uninstall.sh exercised end-to-end in a scratch $HOME
  • gitscrnsvr live-tested on a real GNOME session: idle detection, launch, wake, lock, and the lock-state fix all confirmed working
  • CI run on this PR (workflow added in this branch, first run will be here)

cr2007 added 4 commits July 28, 2026 23:25
install.sh now checks required commands, detects gitlogue via PATH and
every location its own docs describe, and writes a commented
config.env instead of requiring users to hand-edit the installed
script. Add uninstall.sh (with --purge) and a release.yml workflow
that publishes a GitHub Release when a vX.Y.Z tag matching the
script's VERSION is pushed.
Embed VERSION and a `gitscrnsvr update`/--update command that checks
the latest GitHub release and replaces the installed script and
service unit. Read settings from ~/.config/gitscrnsvr/config.env
instead of requiring edits to the installed script, so update can
safely overwrite it. Replace the hardcoded gitlogue path with
find_gitlogue(), which checks PATH and every location gitlogue's own
docs describe.

Fix a real bug: the daemon's idle timer ran independently of GNOME's
actual lock state, so it could launch a second gitlogue instance
behind an already-locked screen. is_screen_locked() now guards
against that. Also make kill_screensaver() poll instead of a flat
1s sleep so the old window closes faster after wake is detected.

Restructure the script around main()/validate_environment()/
run_daemon() so it can be sourced for tests without running the
daemon loop, and extract pure parsing helpers (idle/lock-reply
parsing, version comparison, release-tag parsing) from their D-Bus
and network I/O.
Dependency-free bash test harness under tests/ covering the pure
parsing helpers and find_gitlogue detection in gitscrnsvr, the CLI
surface, and install.sh/uninstall.sh behavior. Everything runs
against scratch HOME directories with systemctl stubbed out so the
suite never touches the real machine's config or systemd units.

Add .github/workflows/test.yml to run the suite on every push and
pull request.
Cover the new install.sh/uninstall.sh flow, the config.env reference
(repository, gitlogue display flags with the full theme list, idle
timing, advanced overrides), gitscrnsvr update/version/help commands,
the release process, and how to run tests/run_all.sh.
@cr2007
cr2007 force-pushed the overall-improvements branch from a6c632f to 6645289 Compare July 28, 2026 19:26
@cr2007
cr2007 requested a review from PB811 July 28, 2026 19:27
@cr2007 cr2007 added bug Something isn't working enhancement New feature or request labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant