Repository navigation
feat(install): install the newest release with one line and print the real address - #2095
Merged
Merged
Conversation
… real address install.sh no longer needs --tag. Without it, the installer reads GitHub's release list the way Core's update check does: the newest stable v0.X.Y (X >= 131), or the newest beta while no stable exists. --beta takes the newer of the two, like Core's beta channel. The list is parsed with grep and awk, so minimal Debian and Raspberry Pi OS Lite need no jq or python. --resume without --tag takes the release from the pending record. The body runs from main on the last line, so a cut curl | bash download runs nothing; sudo asks on the terminal. The script ends with each reachable IPv4 address and the .local name when Avahi or systemd-resolved announces one. A fresh run that finds the pending record says to use --resume, and a computer where systemd is not process 1 is named before any write. Every earlier safety check and the SHA-256 check stay. The test workflow now runs the installer tests when the installer changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
frahlg
added a commit
that referenced
this pull request
Nov 28, 2026
A newcomer met version history first and had to copy a tag from Releases into a twelve-line block. With #2095 the installer picks the release itself, so every install page now gives one line: curl -fsSL https://ftw.energy/install.sh | bash -s -- --fresh-host README opens with five lines: Home Assistant, a Linux computer, what FTW runs on, what a home needs, and the iPhone app. docs/before.md holds the 2.x/3.x, old Docker, second-card and old Home Assistant app material; each first-install page links to it in one line. The Home Assistant pages describe the app after srcfl/home-assistant-addons#56 and #2096: FTW (beta) opens inside Home Assistant behind its login, port 8080 is closed, entities need no broker typed, and a stable app named FTW follows the first stable. The Pi guides in five languages run the line in step 11, show the printed address and list what the setup page asks. native-beta.md and update-sv.md change only their install section, the hardware line and the app rows. scripts/test_install_docs.py now requires the one line, exactly once, on each page that installs, and no other --fresh-host block in README or docs/. CI runs it when those pages change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
frahlg
marked this pull request as ready for review
November 28, 2026 05:54
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
frahlg
added a commit
that referenced
this pull request
Nov 28, 2026
…wn page (#2002) * docs: a short first-install path, with Home Assistant first A newcomer met the architecture first, then a warning about 2.x and 3.x, and reached the install command on line 170 of a 541-line guide. README now opens with what FTW does, a dashboard screenshot and Get started: Home Assistant, then Raspberry Pi or Linux. docs/install.md is the first-install page, with a Swedish copy. The switch guide keeps the old-version material and is not changed here. The Home Assistant guide describes the app as shipped: Open web UI goes to port 8080. Core has an ingress mode, but the app does not turn it on yet. Both guides gain the one-click "add repository" button. The paragraphs about the bundled driver pin move from README to docs/device-repository.md. The install-docs test now checks that the new pages carry the same native block as docs/native-beta.md. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]> * docs: one install line, and old versions on their own page A newcomer met version history first and had to copy a tag from Releases into a twelve-line block. With #2095 the installer picks the release itself, so every install page now gives one line: curl -fsSL https://ftw.energy/install.sh | bash -s -- --fresh-host README opens with five lines: Home Assistant, a Linux computer, what FTW runs on, what a home needs, and the iPhone app. docs/before.md holds the 2.x/3.x, old Docker, second-card and old Home Assistant app material; each first-install page links to it in one line. The Home Assistant pages describe the app after srcfl/home-assistant-addons#56 and #2096: FTW (beta) opens inside Home Assistant behind its login, port 8080 is closed, entities need no broker typed, and a stable app named FTW follows the first stable. The Pi guides in five languages run the line in step 11, show the printed address and list what the setup page asks. native-beta.md and update-sv.md change only their install section, the hardware line and the app rows. scripts/test_install_docs.py now requires the one line, exactly once, on each page that installs, and no other --fresh-host block in README or docs/. CI runs it when those pages change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]> --------- Signed-off-by: Fredrik Ahlgren <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
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.
Problem
A novice who installs FTW on a Linux computer has to copy a version tag from Releases, edit a 12-line block and paste it.
install.shrefuses to run without--tag, and GitHubreleases/latestcannot help: it points atdrivers-stable. The script ends withhttp://<host>:8080/setup, so the user still has to find the box's address. A run after a cut install says to use a new card, although--resumeexists. In a container or in WSL without systemd, the script gets far before it fails. Fredrik decided on 28 Nov 2026 that the installer fetches the newest release itself.Change
scripts/install.shonly:--tagis optional in--fresh-host,--resumeand--refresh. Without it the script readshttps://api.github.com/repos/srcfl/ftw/releases?per_page=100, page by page, the way Core's update check does (resolveChannelingo/internal/selfupdate/selfupdate.go, order kept byscripts/check-native-release-order.py). The default is the newest stablev0.X.Ywith X ≥ 131; while none exists it takes the newest beta and says so in one line.--betatakes the newer of the newest stable and the newest beta, like Core's beta channel. Drafts, old lines and other tags (drivers-*,ha-export-*) never count. The chosen release must carryftw-linux-<arch>.tar.gzand its.sha256; if they are missing, the script stops before it downloads anything.--tag.FTW_RELEASES_URLoverrides the list for tests;FTW_RELEASE_MIRRORstays.--resumewithout--tagtakes the tag from/etc/ftw-native-install.pending, and the checksum must still match.main, which only the last line calls, so a cutcurl … | bashruns nothing. sudo asks on the terminal, so the pipe works.http://IP:8080/setup, leaving out loopback, link-local and container bridges, and addshttp://<name>.local:8080/setuponly when Avahi (asked over D-Bus, without starting it) or systemd-resolved with mDNS on a link announces that name.--fresh-hostthat finds the pending record says to run the same command with--resume.Every earlier safety check and the SHA-256 check stay as they were. The body moved into
main, so view the diff with whitespace hidden (?w=1).Also:
scripts/test-install-native.shgrows the tests below and a real saved GitHub page (scripts/testdata/install/)..github/scripts/classify-test-changes.shnow runs these tests in CI when the installer changes; before, it did not. Changeset:minor, which needs Fredrik's approval.Paired work: ftw-web will serve
/install.shas a 302 toraw.githubusercontent.com/srcfl/ftw/master/scripts/install.sh. Docs that still ask for a tag (#2002, #1530) keep working: they fetch the script at the tag and pass--tag. No open PR touchesscripts/install.sh; #2002 and #1530 touchscripts/test_install_docs.py, which this PR leaves alone.Evidence
Tests (
bash scripts/test-install-native.sh):--beta; a stable newer than every beta; beta.10 above beta.9; missing package; drafts, flag mismatches and old lines ignored; nothing native.--betastops at the first beta, HTTP 403/429/500, cut page, repeated page, next page on another host, no network.--tag, plus a newest release without a package refused before download. Without systemd: the systemd message.Runs:
piand as rootbashas PID 1; plaindebian:trixie-slim.github/scripts/test-change-classifier.shpython3 -m unittest discover -s scripts -p test_install_docs.pyinstall.shcleannice -n 10 env GOFLAGS=-p=3 make verifyon macOSEnd to end, each in a fresh Debian 13 arm64 container (
--privileged, systemd as PID 1, Avahi running), as userpiwhose sudo asks for a password on the terminal. Each found v0.169.0-beta.1 through the real GitHub API and installed its real published package:bash install.sh --fresh-hostcat install.sh | bash -s -- --fresh-hostcurl -fsSL https://raw.githubusercontent.com/srcfl/ftw/8d9d95be/scripts/install.sh | bash -s -- --fresh-hostAbout 6 s of each is the existing 3 × 2 s startup watch. The last lines printed:
After install:
systemctl is-active ftwisactive;curl http://127.0.0.1:8080/setupgives 200;curl http://127.0.0.1:8080/api/statusgives 404page not found, because Core serves only the setup routes until setup is saved (ftw statussays "waiting for setup"). From a second container on the same network, the printed IP address gave 200, andavahi-resolvefound the printed.localname and it gave 200.Other paths in the containers:
/opt/ftw:--fresh-hostprinted the--resumehint and exited 2;--resumewith no tag printedFinishing the install of v0.169.0-beta.1.and finished in 7.9 s.--fresh-hostrefused (Existing FTW installation found at /opt/ftw);--refreshand--refresh --betawithout a tag found the release and replaced the launcher in about 2 s;--resumesaid no install was cut short..localline, and Avahi stayed stopped. systemd-resolved with mDNS on globally and on the link:.localline printed; link off or globalresolve: no line.Not tested
ssh host 'curl … | bash': the script should stop with its sudo message, but no run shows it.https://ftw.energy/install.sh, which does not serve the script yet.Questions for Fredrik
minorfor the changeset?docker*,br-*,veth*,virbr*,cni*,podman*) and keeps VPN addresses such as ZeroTier or Tailscale. Right?--refreshwithout--tagtakes the newest release, not the one Core runs. Keep that, or make it the running version?/api/statusanswers 404 until setup is saved. A person or agent checking a fresh box may read that as broken. Should Core answer it with "waiting for setup"? That is Core work outside this PR.🤖 Generated with Claude Code