Remove the 996-line fork of the Tauri 2.11.4 template and the custom
comparator. src-tauri/windows/hooks.nsh now adds the RuneStone behavior
through bundle.windows.nsis.installerHooks:
- RuneStoneGuiInit (MUI_CUSTOMFUNCTION_GUIINIT) runs before the first
page in interactive and passive setup. It stops a downgrade with exit
code 2. It makes the stock maintenance page skip itself, so that setup
never starts the uninstaller for an upgrade or a reinstall.
- The hidden section RuneStoneVersionCheck runs before the Tauri sections
in all modes. Silent setup shows no pages, so it needs this check.
- NSIS_HOOK_POSTINSTALL writes the release version to DisplayVersion and
RuneStoneReleaseVersion, and the Windows version to
RuneStoneWindowsVersion. Installed apps now show 0.1.23a, not 0.1.23+1.
Setup compares the four-number Windows encoding with ${VersionCompare}.
An unknown installed version stops setup.
buildInstaller.mjs gives the toolchain version to Tauri through a
--config override. It writes tauri.conf.json, Cargo.toml, and Cargo.lock
only after the installer is complete. package.json changes during the
build because the Settings dialog imports its version. A failed build
restores it. Add --dry-run, which prints the plan and changes no file.
The tests compile NSIS programs with the real makensis. They simulate the
installed version in a test-only HKCU key and check /S, /P, /UPDATE, and
interactive setup. A drift check reads the template from the installed
Tauri CLI. The first real installer needs the installer checks in
docs/builds.md.
150 lines
8.7 KiB
Markdown
150 lines
8.7 KiB
Markdown
# Release policy
|
|
|
|
[Builds](builds.md) · [Plugin development](plugin-development.md) · [Installation](installation.md)
|
|
|
|
This policy sets version numbers, release file storage, and publication steps for RuneStone and its plugins.
|
|
|
|
## Versions
|
|
|
|
RuneStone and each plugin keep separate version numbers. Each project uses the form `zz.yy.xx`.
|
|
|
|
| Part | Increase it for | Then reset |
|
|
| --- | --- | --- |
|
|
| `xx` | Each new completed regular build. The number has no two-digit limit. | Nothing |
|
|
| `yy` | A deliberate release that is ready for build testing, by direction of the project owner | `xx` to zero |
|
|
| `zz` | A full release, by direction of the project owner | `yy` and `xx` to zero |
|
|
|
|
A build is a RuneStone installer or a plugin ZIP, unless the project owner asks for a different distributable.
|
|
Development servers, test runs, and intermediate compilation output are not builds.
|
|
|
|
- Keep routine implementation work in the current `zz.yy` series.
|
|
- Keep the current version during source edits, fixes, improvements, documentation work, and automated checks.
|
|
- Do not change a version for an edit to agent instructions only.
|
|
- Set the next version when you produce the build. Keep all version fields of the project consistent.
|
|
- If no build completes, restore the previous version fields. Failed attempts and retries do not use a version number.
|
|
- Report a new version as available only after its build file exists.
|
|
- Publishing an existing build file does not change its version.
|
|
- Passing automated checks does not authorize a `yy` or `zz` increase.
|
|
|
|
| Project | Version fields |
|
|
| --- | --- |
|
|
| RuneStone | `package.json`, `src-tauri/tauri.conf.json`, the package version and `[package.metadata.runestone]` in `src-tauri/Cargo.toml`, and the `runestone` entry in `src-tauri/Cargo.lock` |
|
|
| Plugin | `plugin.json`, the project `package.json`, and any build metadata |
|
|
|
|
On Windows, `pnpm build:installer --version <version>` sets the RuneStone fields when the installer is complete. If the build fails, the fields keep the previous version.
|
|
See [Build the Windows installer](builds.md#build-the-windows-installer).
|
|
|
|
## Hotfix versions
|
|
|
|
A hotfix fixes one item or a narrowly scoped problem in an existing release.
|
|
It keeps `zz.yy.xx` and adds or advances a lowercase letter suffix.
|
|
|
|
- Advance the suffix in this order: `a`, `b`, `c`, through `z`, then `aa`, `ab`, and later suffixes.
|
|
For example: `0.2.28` → `0.2.28a` → `0.2.28b`.
|
|
- The next regular build increases `xx` and removes the suffix: `0.2.28b` → `0.2.29`.
|
|
- Never use a numeric increment in place of a hotfix suffix.
|
|
|
|
Use the same literal hotfix version in `package.json`, `plugin.json`, build metadata, file names, release notes, and tags.
|
|
|
|
Example, from the file name rule in `scripts/packagePlugin.mjs`: the plugin `org.example.hello` at version `1.0.0a` produces `org.example.hello-1.0.0a.zip`, with the tag `v1.0.0a`.
|
|
|
|
If a package format rejects the suffix, add support for it or report the blocker before you build.
|
|
Do not bypass validation. Do not overwrite an existing release ZIP.
|
|
Older RuneStone hosts that accept only numeric plugin versions reject suffixed packages.
|
|
|
|
Some installer toolchains accept only numeric or SemVer versions.
|
|
For those fields, RuneStone uses a reversible encoding. See [Hotfix installer versions](builds.md#hotfix-installer-versions).
|
|
Visible version strings, release metadata, and file names keep the literal version.
|
|
|
|
## Release files
|
|
|
|
These rules apply to the main app, all existing plugins, and all new plugins.
|
|
|
|
| Release | Folder |
|
|
| --- | --- |
|
|
| RuneStone installer | `releases/<version>/` at the RuneStone project root |
|
|
| Plugin ZIP | `releases/` at the root of that plugin project |
|
|
|
|
- Keep release notes, checksums, and build metadata with the release they describe, in the local release folder.
|
|
- Keep `releases/` out of Git.
|
|
- Use `dist/`, `build/`, `output/`, and toolchain folders only for compilation, staging, logs, and checks.
|
|
- After packaging, move the completed installer from the toolchain bundle folder into `releases/`.
|
|
Do not leave a second copy in the bundle folder.
|
|
- Never copy a plugin ZIP into the host project or into a different plugin project.
|
|
- Do not overwrite a release with different contents. Keep distinct versions and files with different contents.
|
|
- Remove a duplicate file only after its SHA-256 hash matches the file that you keep.
|
|
- Report a filename conflict before you change a file name.
|
|
- After each completed build, report the full path of the build file.
|
|
|
|
`pnpm build:installer` and `pnpm package:plugin` obey these rules for their own output.
|
|
The installer script stops if the release file exists. The plugin packager reuses an identical ZIP and stops if the existing ZIP has different contents.
|
|
|
|
## Publish an installer
|
|
|
|
Publish RuneStone installers on the [RuneStone releases page](https://git.knottywyvern.com/kwyvern/RuneStone/releases).
|
|
|
|
1. Build the installer and complete the [installer checks](builds.md#installer-checks).
|
|
2. Create a release with the tag `v<version>`.
|
|
3. Attach only installer binaries.
|
|
4. Leave the release description empty.
|
|
5. Publish the release.
|
|
6. Put the installation checksums in `docs/checksums/<version>/`.
|
|
7. Link the checksums from the [installation guide](installation.md).
|
|
8. Update the download links in the README.
|
|
|
|
The empty description lets users reach the downloads directly.
|
|
Do not attach Markdown files, release notes, checksums, metadata, logs, or screenshots.
|
|
Put release notes, test results, and installation instructions in the repository documentation.
|
|
Keep the other build records in the local release folder.
|
|
|
|
## Publish a plugin release
|
|
|
|
These rules apply on all hosting services. The service stores the files. RuneStone defines the package format, the versions, and the installation checks.
|
|
|
|
1. Build the ZIP with the procedure in [Build and package a plugin](plugin-development.md#build-and-package-a-plugin).
|
|
2. Install the ZIP in RuneStone. Test its features, the disable action, and removal.
|
|
3. Create a tag that identifies the source commit of that ZIP.
|
|
4. Attach the tested `<id>-<version>.zip` to a release for that tag.
|
|
5. Publish the release.
|
|
6. Download the published ZIP and test it in RuneStone.
|
|
|
|
Use `v<version>` for an ordinary release tag.
|
|
For a temporary prerelease, use a clearly named trial tag and mark the release as a prerelease.
|
|
Give users that explicit tag.
|
|
|
|
After publication, test these with the published ZIP:
|
|
|
|
- Download, review, installation in the disabled state, enable, disable, and removal
|
|
- Cancellation, which must leave no installed package
|
|
- An update of an installed plugin ID, which must keep its settings and enabled state
|
|
- The repository link with the explicit tag, if RuneStone can install from that service
|
|
|
|
Rules for the release:
|
|
|
|
- Publish one plugin ZIP for each release. Attach only that ZIP and leave the release description empty.
|
|
- The ZIP contains `plugin.json` at its root, the compiled entry module, and all required assets and dependencies.
|
|
See the [package contract](plugin-development.md#package-contract).
|
|
- Never use a repository source archive as the plugin package.
|
|
- Keep published release files unchanged. Moving an unchanged release to a different service needs no new package or version.
|
|
- Put release notes in the plugin repository documentation. Give the required RuneStone version, plugin version, changes, and known limits.
|
|
- Give users a link to the ZIP and to the [plugin installation guide](plugins.md).
|
|
- For a private release, users need permission to download the package.
|
|
|
|
| Service | How users install | Publisher notes |
|
|
| --- | --- | --- |
|
|
| Gitea | Download the ZIP, or use the experimental Gitea link installation | See the list below. |
|
|
| GitHub | Download the attached ZIP and install it in **Settings → Plug-ins** | Automatic source archives do not replace the attached ZIP. Installation from a GitHub link needs a download adapter and tests. That work is in the future. |
|
|
| GitLab and other services | Download the ZIP and install it in **Settings → Plug-ins** | RuneStone has no repository-link adapter for these services. |
|
|
|
|
Gitea link installation needs these conditions:
|
|
|
|
- The link is the repository root, with an optional trailing `.git`.
|
|
- The Gitea server runs at the host root.
|
|
- The release has exactly one attached `.zip` file. Automatic source archives do not count.
|
|
- The latest-release route skips drafts and prereleases. Use an explicit tag for a prerelease trial.
|
|
- For a private repository, the user needs read access to the release metadata and the attachment.
|
|
- The server uses HTTPS. HTTP sends the token and the package without encryption.
|
|
|
|
For download limits, credential handling, and redirects, see [Gitea downloads](plugin-host.md#gitea-downloads).
|
|
For GitHub publication steps, see [GitHub's release instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
|