Skip to content

install.sh: place each release with basert self install, under versions/ - #83

Merged
IsuraManchanayake merged 1 commit into
mainfrom
install/versions-layout
Oct 29, 2026
Merged

IsuraManchanayake merged 1 commit into
mainfrom
install/versions-layout

Conversation

@IsuraManchanayake

Copy link
Copy Markdown
Contributor

From 0.4.3, the basert launcher places a release itself with basert self install --from <dir> --root <dir>. That is the layout basert self update keeps up to date:

  • releases side by side under ~/.basert/versions/<v>/
  • versions/current naming the one in use
  • ~/.basert holding a link per release file through it, so the PATH line stays the same.

install.sh now unpacks the bundle into ~/.basert/versions/.staging/ and hands it to whichever launcher can place it:

  1. The bundle's own basert (0.4.3 and later).
  2. Otherwise the installed basert, when a pinned older release (BASERT_VERSION) goes over a 0.4.3+ install.
  3. Otherwise nothing: it is unpacked flat into ~/.basert exactly as before, leaving the same files.

A copy an earlier run placed flat is kept as versions/<old>, the version basert self use <old> goes back to. The "already on " check is unchanged: .release is still written in ~/.basert, and ~/.basert/basert resolves through its link. The closing message mentions basert self update when the release can do it.

Safe to merge before 0.4.3 is published: a release without self install takes path 3.

Tested on macOS/arm64 with a stub curl serving local bundles:

  • a fresh install of a release with self install
  • an older release, fresh (flat, layout identical to today's script)
  • that flat install, then the new release over it (the flat copy kept under versions/)
  • a pinned older release over the layout (placed by the installed launcher)
  • a re-run on the same tag (skipped).

From 0.4.3 the launcher places a release itself: install.sh unpacks the bundle beside the install, and the bundle's basert (or the installed one, for an older release) moves it to versions/<v> and turns the links in the install directory to it. A copy an earlier run placed flat is kept as the version to go back to; a release whose launcher cannot place it, with no installed one that can, is unpacked flat as before.
@IsuraManchanayake
IsuraManchanayake merged commit c5faf60 into main Oct 29, 2026
11 checks passed
@IsuraManchanayake
IsuraManchanayake deleted the install/versions-layout branch October 29, 2026 22:53
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