KB: Self-Update Process
triggerfish update कसे काम करते, काय चुकू शकते, आणि recover कसे करायचे.
हे कसे काम करते
Update command GitHub मधून latest release download आणि install करतो:
Version check. GitHub API मधून latest release tag fetch करतो. तुम्ही आधीच latest version वर असल्यास, early exit होतो:
Already up to date (v0.4.2)Development builds (
VERSION=dev) version check skip करतात आणि नेहमी proceed करतात.Platform detection. तुमचे OS आणि architecture (linux-x64, linux-arm64, macos-x64, macos-arm64, windows-x64) वर आधारित correct binary asset name determine करतो.
Download. GitHub release मधून binary आणि
SHA256SUMS.txtfetch करतो.Checksum verification. Downloaded binary चे SHA256 compute करतो आणि
SHA256SUMS.txtमधील entry विरुद्ध compare करतो. Checksums match नसल्यास, update abort केला जातो.Daemon stop. Binary replace करण्यापूर्वी running daemon stop करतो.
Binary replacement. Platform-specific:
- Linux/macOS: जुना binary rename करतो, नवीन जागी move करतो
- macOS extra step:
xattr -crसह quarantine attributes clear करतो - Windows: जुना binary
.oldला rename करतो (Windows running executable overwrite करू शकत नाही), नंतर नवीन binary original path ला copy करतो
Daemon restart. नवीन binary सह daemon start करतो.
Changelog. नवीन version साठी release notes fetch आणि display करतो.
Sudo Escalation
Binary root access आवश्यक असलेल्या directory मध्ये installed असल्यास (उदा. /usr/local/bin), updater sudo सह escalate करण्यासाठी तुमचा password prompt करतो.
Cross-Filesystem Moves
Download directory आणि install directory different filesystems वर असल्यास (common with /tmp separate partition वर), atomic rename fail होईल. Updater copy-then-remove ला fall back होतो, जे safe आहे पण briefly दोन्ही binaries disk वर असतात.
काय चुकू शकते
"Checksum verification exception"
Downloaded binary expected hash शी match होत नाही. याचा सहसा अर्थ:
- Download corrupted झाला (network issue)
- Release assets stale किंवा partially uploaded आहेत
Fix: काही minutes wait करा आणि पुन्हा try करा. Persist राहिल्यास, releases page मधून binary manually download करा.
"Asset not found in SHA256SUMS.txt"
तुमच्या platform साठी checksum शिवाय release published झाला. हे release pipeline issue आहे.
Fix: GitHub issue file करा.
"Binary replacement failed"
Updater जुना binary नवीन सह replace करू शकला नाही. Common causes:
- File permissions (binary root ने owned आहे पण तुम्ही normal user म्हणून running आहात)
- File locked आहे (Windows: दुसरी process ने binary open आहे)
- Read-only filesystem
Fix:
- Daemon manually stop करा:
triggerfish stop - Stale processes kill करा
- Appropriate permissions सह update पुन्हा try करा
"Checksum file download failed"
GitHub release मधून SHA256SUMS.txt download करता येत नाही. Network connection check करा आणि पुन्हा try करा.
Windows .old file cleanup
Windows update नंतर, जुना binary triggerfish.exe.old ला renamed होतो. हे file पुढील start वर automatically cleaned up होते. Cleaned up नाही झाल्यास (उदा. नवीन binary startup वर crash होतो), manually delete करू शकता.
Version Comparison
Updater semantic versioning comparison वापरतो:
- Leading
vprefix strip करतो (दोन्हीv0.4.2आणि0.4.2accepted आहेत) - Major, minor, आणि patch numerically compare करतो
- Pre-release versions handled (उदा.
v0.4.2-rc.1)
Manual Update
Automatic updater काम नाही करत असल्यास:
- GitHub Releases मधून तुमच्या platform साठी binary download करा
- Daemon stop करा:
triggerfish stop - Binary replace करा:bash
# Linux/macOS sudo cp triggerfish-linux-x64 /usr/local/bin/triggerfish sudo chmod +x /usr/local/bin/triggerfish # macOS: quarantine clear करा xattr -cr /usr/local/bin/triggerfish - Daemon start करा:
triggerfish start
Docker Update
Docker deployments binary updater वापरत नाहीत. Container image update करा:
bash
# Wrapper script वापरत असल्यास
triggerfish update
# Manually
docker compose pull
docker compose up -dWrapper script latest image pull करतो आणि एक running असल्यास container restart करतो.
Changelog
Update नंतर, release notes automatically displayed होतात. Manually देखील पाहू शकता:
bash
triggerfish changelog # Current version
triggerfish changelog --latest 5 # Last 5 releasesUpdate नंतर changelog fetching fail झाल्यास, ते logged आहे पण update ला affect करत नाही.
