example · daukle · daukle/daukle

daukle-wrapper-bootstrap

The one example run by an INSTALLED daukle rather than the one the harness compiled: daukle init writes the wrapper with no network, and from then on the project's own ./daukle downloads the pinned daukle, checks it against a digest and runs it.

$ daukle init
daukle: wrote .daukle/wrapper.toml
$ ./daukle sync
in sync

PowerShell runs the second line as .\daukle.ps1 sync.

What to look at

This directory commits no wrapper. init writes all three files: the two scripts are compiled into the binary, and .daukle/wrapper.toml is the pin the release ships beside it, so the project pins exactly the daukle that ran init. daukle.toml already exists here, so init leaves it alone and writes only the wrapper.

uses-release puts the latest release's archive on the harness's PATH, unpacked for the host, in place of the build under test. That is what "installed" means here: the archive is what every install channel carries, a binary and its wrapper.toml side by side.

No version is asserted. The wrapper's digest check is what proves the binary is the pinned one, and a version in this file was one more thing a release had to come back and edit. It was left red by 0.3.0 and again by 0.4.0.

The manifest is the smallest in this repository on purpose. What is being demonstrated is the bootstrap, so the manifest acquires one plugin by coordinate and stops.

What this cannot show

windows-latest and macos-latest, the last of them arm64. linux/aarch64 and windows/aarch64 are unpublished, so nothing here says what the wrapper does on them beyond refusing them by name.

downloader, live in daukle/daukle's wrapper/test/probe.sh inside a deliberately bare image.

cli_commands under ctest holds the unreleased init.

Every file in it

daukle.toml

schema = 1
project = "daukle/example-wrapper-bootstrap"
version = "1.0.0"

[modules]

# Deliberately the smallest manifest in this repository. The point of this example is not what
# daukle does once it is running, it is that nothing had to be installed for it to run at all:
# every other example here is executed by a daukle the harness compiled from source, and this one
# is executed by the daukle its own ./daukle fetched.
[resolvers.github]
url = "https://raw.githubusercontent.com/daukle/daukle/1f515141e06d16eace718a45944a39933611fa39/plugins/github-releases.lua"
sha256 = "3789865c266eb53fafcf7300d77a24461170c615195d92d0ddf88078c556e23e"

[plugins]
path = { resolver = "github", coordinate = "daukle/path@^1.0.0" }

Not shown here: needs-tools, uses-release.