Releasing
How a release of the compiler is cut, what its tarball holds, and what is left to publish it.
A release is cut on the Mac that builds it, by one script that publishes nothing:
scripts/release.sh 0.0.1
It refuses unless the tree is clean and HEAD is origin/dev (--expect <sha> names another
commit, which is how a branch is put through a dry run, and --repo <dir> another checkout). Then,
each step timed into release-out/<version>/release.log with its output beside it:
- The version. It stamps
const Versionincompiler/dev/avinlang/compiler/cli.syslandpackage.versionincompiler/sysl.hocon, which a test holds in step, and inlibrary/library.hocon, which the compiler checks against its own version and refuses a library that differs from, and commits the stamp asavin <version>on the local branch, unless the tree carries that version already. - The compiler, built at
-O2by thesyslonPATH. - The prefix.
bin/avin;share/avin/libraryandshare/avin/runtimeas git tracks them;share/avin/editors, the TextMate grammars of.avinand.lavin; andshare/avin/lib/<target>/libavinrt-<target>-<key>.a, the runtime’s archive for the machine the release is built on. The archive is built by the staged compiler from the staged runtime, so its key, a hash of the compiler’s version, the target and the runtime’s sources, is the one an installed compiler computes, and an installed compiler links it without running Sysl. - The tarball,
avin-<version>-darwin-arm64.tar.gz, and its sha256. - The proof, from the tarball. It unpacks the tarball outside the repository, makes the prefix
read-only as a Homebrew keg is, and from a scratch directory, with
AVIN_ROOTunset and a freshAVIN_CACHE, runsavin --version; builds and runs a hello program with only/usr/binand/binonPATH, which must link the shipped archive; runs a program that reaches a Sysl binding, whose shims Sysl builds into the cache; makes a package withavin newand runsavin teston it; and hasavin lspanswerinitialize. - The formula,
packaging/homebrew/avin.rbwith the version and sha256 filled in, written torelease-out/<version>/avin.rb.
AVIN_RELEASE_SLOT=<script> runs the build through a wrapper, as zsh <script> <dir> <command...>,
so a release waits its turn behind a test run.
What is left
The script ends by printing the steps it does not take, each of which other people see:
- push the stamp to
dev, then tag the release commitv<version>and push the tag; - create the GitHub release
v<version>inavin-lang/avinwith the tarball; - download the asset the release serves and check its sha256 is the one the script printed;
- copy the filled formula into
Formula/avin.rbofavin-lang/homebrew-tapand push the tap; brew install avin-lang/tap/avinandbrew test avin.
What an installed compiler needs
clang, which links every program, from Xcode’s command-line tools; and sysl, which builds the
shims of the Sysl bindings a program reaches, and which the formula depends on. A program that
reaches no binding is built with clang alone. The runtime archives and shims the compiler builds go
to the user’s cache, ~/Library/Caches/avin/<version>, never into the installed prefix.
The repository has no license file yet, so the tarball carries none.