fix: postinst auto-restart services on upgrade and build-package.sh version sync
All checks were successful
CI Pipeline / Rust Format Check (push) Successful in 6s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m2s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 13s
CI Pipeline / Build .deb & Release (push) Has been skipped
All checks were successful
CI Pipeline / Rust Format Check (push) Successful in 6s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m2s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 13s
CI Pipeline / Build .deb & Release (push) Has been skipped
- debian/postinst: auto-restart patch-manager-web and patch-manager-worker on upgrade (not fresh install) - debian/postinst: list pending database migrations after upgrade - scripts/build-package.sh: update debian/control Version from VERSION variable to ensure dpkg handles upgrades correctly - tasks/lessons.md: added lessons about service restarts and version sync
This commit is contained in:
@ -107,6 +107,9 @@ cp "${PROJECT_ROOT}/debian/prerm" "${BUILD_DIR}/DEBIAN/prerm"
|
||||
cp "${PROJECT_ROOT}/debian/postrm" "${BUILD_DIR}/DEBIAN/postrm"
|
||||
chmod 755 "${BUILD_DIR}/DEBIAN/postinst" "${BUILD_DIR}/DEBIAN/prerm" "${BUILD_DIR}/DEBIAN/postrm"
|
||||
|
||||
# Update Version in control file to match Cargo.toml version
|
||||
sed -i "s/^Version: .*/Version: ${VERSION}-${RELEASE}/" "${BUILD_DIR}/DEBIAN/control"
|
||||
|
||||
# Calculate installed size (in KB)
|
||||
INSTALLED_SIZE=$(du -sk "${BUILD_DIR}" | cut -f1)
|
||||
sed -i "s/^Installed-Size: .*/Installed-Size: ${INSTALLED_SIZE}/" "${BUILD_DIR}/DEBIAN/control"
|
||||
|
||||
Reference in New Issue
Block a user