Changeset 09a2061 in Klonkt


Ignore:
Timestamp:
06/29/2026 11:27:49 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
1273101
Parents:
328d837
Message:

fix(install): klonkt-update no longer restarts (or claims "updated") when already current

klonkt-update always ran systemctl restart klonkt and printed "Klonkt updated" even
when the fetched commit equalled the current one — a needless restart and a misleading
message on every run. It now exits early with "already up to date" when HEAD is unchanged.

  • scripts/install.sh — the generated /usr/local/bin/klonkt-update bails out before the npm/restart steps when $B == $A (no new commit)

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/install.sh

    r328d837 r09a2061  
    238238runuser -u ${KLONKT_USER} -- git -C "\$D" reset --hard origin/${KLONKT_BRANCH}
    239239A=\$(runuser -u ${KLONKT_USER} -- git -C "\$D" rev-parse HEAD)
     240if [ "\$B" = "\$A" ]; then
     241  echo "Klonkt is already up to date (\$A) — nothing to do."
     242  exit 0
     243fi
    240244if ! runuser -u ${KLONKT_USER} -- git -C "\$D" diff --quiet "\$B" "\$A" -- package-lock.json 2>/dev/null; then
    241245  runuser -u ${KLONKT_USER} -- env HOME="\$D" bash -c "cd '\$D' && npm ci --omit=dev"
Note: See TracChangeset for help on using the changeset viewer.