v3.32.0: the packaged-install updater + a repo CHANGELOG
release / release (push) Has been cancelled

Reinstalling the package was slow because setup rebuilds pysim's
prerequisites (pyscard compiles from source on Linux), while a clone
updates with a plain `git pull`.

- tools/update.py (+ update.sh / update.bat in the package, and the
  release workflow shipping them) updates a packaged install in place:
  it downloads the latest release package, extracts it (zip-slip guard,
  permission bits restored - zipfile drops them), replaces the app files
  over the app directory and re-installs the app into the existing
  .venv.  The .venv and simple_lastrun.log are not in the package, so
  pysim and its prerequisites survive: seconds, not a rebuild.
  --check / --version / --zip (offline) / --no-pip / --force; the same
  version is a no-op.
- CHANGELOG.md (Keep a Changelog, from the first packaged release;
  earlier history is the git log).  The release workflow now uses the
  version's CHANGELOG section as the release body
  (tools/changelog_section.py, falling back to generated notes).
- The READMEs document the update path and the `git clone --depth 1`
  option for the clone path; setup prints the update hint.
- Version strings + the PWA cache bumped together (simple-v458).

Verified: 1007 Python + 953 frontend; the release-package test covers
the new files; the updater was exercised end to end (a v3.31.2 install
with a real venv updated to the 3.32.0 package: files replaced, the
venv marker kept, pip metadata 3.32.0, exec bits kept, a second run a
no-op, --check correct).
This commit is contained in:
2026-10-21 00:35:47 +03:00
parent 2237a35db5
commit aa8c9c6f12
17 changed files with 520 additions and 12 deletions
+9 -2
View File
@@ -30,11 +30,17 @@ SIMple — инструментарий для специалистов по UIC
разработки. Git всё равно нужен: `setup` ставит **pysim** из его upstream-репозитория
(ни pysim, ни его зависимости в пакет не входят).
**Обновление быстрое:** `./update.sh` (или `update.bat`) скачивает последний релизный
пакет, заменяет файлы приложения на месте и переустанавливает приложение в существующий
`.venv` — pysim и его зависимости остаются, ничего не пересобирается.
`./update.sh --check` показывает текущую и последнюю версии, `--version X.Y.Z` —
конкретный релиз, `--zip file.zip` — обновление из локального пакета.
**2. Клонировать репозиторий (для разработки или ещё не выпущенных изменений).**
```sh
git clone https://github.com/anttro/simple.git
cd simple
git clone https://github.com/anttro/simple.git # или --depth 1: без истории,
cd simple # `git pull` всё равно обновляет
./setup.sh # или setup.bat в Windows
./start.sh # или start.bat
```
@@ -732,6 +738,7 @@ PWA проверяет версию сервера при подключении
|--------|-------------|
| `setup.sh` / `setup.bat` | Создаёт `.venv/`, ставит pysim и сервер. Запускать один раз после клонирования или распаковки релизного пакета. |
| `start.sh` / `start.bat` | Запускает сервер из venv (раздаёт PWA + API на `:8080`). |
| `update.sh` / `update.bat` | Обновляет пакетную установку на месте: скачивает последний релизный пакет, заменяет файлы приложения и переустанавливает приложение в существующий `.venv` (pysim сохраняется). `--check`, `--version X.Y.Z`, `--zip FILE`, `--no-pip`, `--force`. |
`start.sh` при работающем `pcscd` запрашивает первый PC/SC-ридер; иначе сервер сам автоопределяет PC/SC-ридер, а если его нет — pysim откатывается на последовательное устройство по умолчанию `/dev/ttyUSB0` (для serial/FTDI-ридера укажите `-d <устройство>`). `start.bat` всегда передаёт `-p 0`. Дополнительные аргументы передаются серверу, например `./start.sh --gsmtap` или `start.bat --gsmtap 10.0.0.5:4729`. Без ридера сервер всё равно стартует («Reader: none») — карту можно инициализировать позже кнопкой **Equip**.