etherpad-lite/bin
John McLear 301ae4df2c
feat: add one-line installer script (#7466) (#7485)
* feat: add one-line installer script (#7466)

Adds bin/installer.sh, a small POSIX shell script that:
- Verifies prerequisites (git, Node.js >= 18)
- Installs pnpm globally if missing (with sudo fallback)
- Clones etherpad-lite (configurable branch / dir)
- Runs `pnpm i` and `pnpm run build:etherpad`
- Optionally starts Etherpad if ETHERPAD_RUN=1

Users can now install Etherpad with a single command:

  curl -fsSL https://raw.githubusercontent.com/ether/etherpad-lite/master/bin/installer.sh | sh

README updated to feature the one-liner above the existing
Docker-Compose / manual install instructions.

Closes #7466

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add installer-test workflow + Windows PowerShell installer

- bin/installer.ps1: PowerShell port of installer.sh so the one-liner
  also works on Windows via 'irm ... | iex'.
- .github/workflows/installer-test.yml: end-to-end CI that runs each
  installer against the PR's own commit (via ETHERPAD_REPO/BRANCH env
  vars), verifies clone + node_modules + admin SPA artifacts, and
  smoke-tests by starting Etherpad and curling /api. Runs on
  ubuntu-latest, macos-latest, and windows-latest. Includes a
  shellcheck job for installer.sh.
- README: feature the Windows one-liner alongside the POSIX one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: fix windows smoke test - wrap pnpm in cmd /c

Start-Process can't run pnpm.cmd directly ("not a valid Win32 application").
Wrap it via cmd.exe /c instead, and bump the wait window to 90s for slower
Windows runners. Also dump stderr alongside stdout when the smoke test
fails for easier debugging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address Qodo review on installer (#7485)

Two correctness issues caught by Qodo:

1. Node version mismatch: installer required Node >= 18, but the repo's
   engines.node is >= 20. Bump REQUIRED_NODE_MAJOR to 20 in both shell
   and PowerShell installers, and update the README's quick-install
   prerequisite and Requirements section to match.

2. Branch ignored for existing checkouts: when ETHERPAD_DIR already
   existed, the script ran 'git pull --ff-only' on whatever branch
   happened to be checked out, ignoring ETHERPAD_BRANCH and never
   verifying ETHERPAD_REPO. The existing-dir path now:
   - validates the remote URL matches ETHERPAD_REPO
   - refuses to clobber uncommitted changes (excluding pnpm-lock.yaml,
     which pnpm i rewrites during install)
   - fetches with --tags --prune
   - checks out ETHERPAD_BRANCH as a branch or detaches at it as a tag
   - prints the resulting commit short SHA for clarity

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:10:22 +01:00
..
deb-src cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
nsis cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
plugins Enable globstar in plugin backend-tests template (#7414) 2026-03-31 22:01:29 +01:00
buildDebian.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
buildForWindows.sh Feat/bundle js (#6511) 2024-07-18 08:51:30 +02:00
checkAllPads.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
checkPad.ts Fixed checkPad script not returning 2024-07-12 08:34:53 +02:00
cleanRun.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
commonPlugins.ts Enforce 2-space indentation across codebase (#7426) 2026-04-01 19:48:45 +01:00
convertSettings.json.template cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
createRelease.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
createUserSession.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
debugRun.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
deleteAllGroupSessions.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
deletePad.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
extractPadData.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
fastRun.sh chore: fixed fastRun.sh script (#7063) 2025-08-05 18:24:19 +02:00
functions.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
generateReleaseNotes.ts chore: fixed generatereleasenotes to respect filename 2025-11-05 22:14:58 +01:00
importSqlFile.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
installDeps.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
installer.ps1 feat: add one-line installer script (#7466) (#7485) 2026-04-07 17:10:22 +01:00
installer.sh feat: add one-line installer script (#7466) (#7485) 2026-04-07 17:10:22 +01:00
installLocalPlugins.sh Fix installation of local plugins 2025-04-05 15:31:36 +02:00
installOnWindows.bat Feat/oauth2 (#6281): Added oauth to API paths 2024-03-26 17:11:24 +01:00
make_docs.ts Enforce 2-space indentation across codebase (#7426) 2026-04-01 19:48:45 +01:00
migrateDB.ts chore: adapted documentation for migrateDB.ts (#7088) 2025-08-24 20:50:16 +02:00
migrateDirtyDBtoRealDB.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
package.json build(deps-dev): bump the dev-dependencies group with 4 updates (#7443) 2026-04-03 20:10:05 +01:00
plugins.ts plugins.ts - absence of case = "remove" (#7141) 2025-09-29 19:26:30 +02:00
push-after-release.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
rebuildPad.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
release.ts chore: git tag without signature 2025-08-02 13:42:37 +02:00
repairPad.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
run.sh Feat/bundle js (#6511) 2024-07-18 08:51:30 +02:00
safeRun.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
tsconfig.json Removed deprecated js files. 2024-08-18 19:22:08 +02:00
updatePlugins.sh fix: use pnpm instead of npm in updatePlugins.sh (#7468) 2026-04-06 11:21:21 +01:00