SorterOS — Operations
Repair git and get on stable
How-to guidePut the machine's software back on a release from the Orange Pi's terminal, whatever state it is in.
For when Settings → Versions can't update the machine: it offers no update, the update fails, or someone changed the software by hand.
Run the script
Log in to the Orange Pi (over SSH: user root, password orangepi) and run:
curl -fsSL https://raw.githubusercontent.com/basicallysource/sorter-v2/main/software/scripts/get-on-release.sh | sudo bash
That puts it on the newest stable release. For canary:
curl -fsSL https://raw.githubusercontent.com/basicallysource/sorter-v2/main/software/scripts/get-on-release.sh | sudo bash -s canary
It takes a few minutes and restarts the backend, so stop the machine first. It:
- leaves your settings, database, pictures and logs alone
- saves any edits to the software on a
backup/<date>git branch - fixes what stops an update: a branch, a stopped merge, a stale lock, damaged git files
By hand
The same main steps, on a checkout in good shape:
- Download the releases and put local edits aside.
cd /home/orangepi/sorter-v2 git fetch --tags --prune --prune-tags --force origin git -c user.name=sorter -c user.email=sorter@localhost stash - Check out the newest stable release (put
canaryin place ofstablefor canary).git checkout -f --detach "$(git tag -l 'sorter/stable/v*' --sort=-v:refname | head -1)" - Install the Python packages and build the UI.
(cd software/sorter/backend && uv sync --locked) (cd software/sorter/frontend && CI=true pnpm install --frozen-lockfile && pnpm build) - Restart the backend.
systemctl restart sorter-backend-dev.service