mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Upgrade script upgrades single-file-cli to the pinned version.
Old single-file versions (1.x) create compressed Archives without the SingleFile comment header in the self-extracting prelude, which WROLPi rejects as invalid. The install scripts only install single-file when it is missing, so existing machines were never upgraded. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0a776d030f
commit
65513eab82
1 changed files with 15 additions and 0 deletions
|
|
@ -74,6 +74,21 @@ upgrade_deno() {
|
|||
|
||||
upgrade_deno || echo "Deno upgrade failed, continuing..."
|
||||
|
||||
# Upgrade single-file to the pinned version; old versions (1.x) create compressed Archives without
|
||||
# the SingleFile comment header in the prelude, which WROLPi cannot validate.
|
||||
# readability-extractor is pinned alongside it to match the install scripts.
|
||||
upgrade_singlefile() {
|
||||
SINGLE_FILE_VERSION="2.0.73"
|
||||
if [ "$(single-file --version 2>/dev/null)" != "${SINGLE_FILE_VERSION}" ]; then
|
||||
echo "Upgrading single-file-cli to ${SINGLE_FILE_VERSION}..."
|
||||
npm i -g single-file-cli@${SINGLE_FILE_VERSION} readability-extractor@0.0.6
|
||||
else
|
||||
echo "single-file-cli ${SINGLE_FILE_VERSION} already installed"
|
||||
fi
|
||||
}
|
||||
|
||||
upgrade_singlefile || echo "single-file upgrade failed, continuing..."
|
||||
|
||||
# Clear Python bytecode cache before upgrading packages.
|
||||
echo "Clearing Python bytecode cache..."
|
||||
find /opt/wrolpi/venv -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue