Skip to content

install.sh: idempotent upgrade (version-skip + clean reinstall) - #14

Merged
prabod merged 1 commit into
mainfrom
feat/install-hardening
Jun 30, 2026
Merged

prabod merged 1 commit into
mainfrom
feat/install-hardening

Conversation

@prabod

@prabod prabod commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Hardens the installer for re-runs on an already-installed system.

Changes

  • Version-skip: resolves the target release once, reads its tag_name, and writes it to $INSTALL_DIR/.release. A re-run no-ops when you're already on that tag (basert present + stamp matches). BASERT_FORCE=1 reinstalls anyway.
  • Clean reinstall: removes the previous bundle's files before extracting, so a file removed in a newer release doesn't linger as an orphan. Only known bundle paths are touched (basert, basert-*, baseRT_*, libbaseRT.dylib, baseRT.metallib, include/) — a custom INSTALL_DIR with unrelated files is safe.
  • One API call instead of two; BASERT_FORCE documented.

Verified: sh -n clean; tag + asset URL parse correctly against the live release API (v0.1.3). PATH wiring is unchanged (already idempotent).

- Resolve the release once, read its tag_name, and stamp it to $INSTALL_DIR/.release.
  Re-running now no-ops when already on the target tag (BASERT_FORCE=1 overrides).
- Remove the previous bundle's artifacts before extracting so a file dropped in a
  newer release can't linger as an orphan (only known bundle paths are touched).
- Document BASERT_FORCE.
@prabod
prabod merged commit 0e04e38 into main Jun 30, 2026
3 checks passed
@prabod
prabod deleted the feat/install-hardening branch June 30, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant