Skip to main content

Version format

Arius uses a semantic versioning scheme with the patch segment automatically set from the CI/CD run number.
ContextFormatExample
Production release (main branch)5.0.{GITHUB_RUN_NUMBER}5.0.123
Prerelease (non-main branch)5.0.{GITHUB_RUN_NUMBER}-prerelease5.0.123-prerelease
Local development build5.0.0-local5.0.0-local

Version flow

1

Local development

When building locally without a GITHUB_RUN_NUMBER environment variable, MSBuild falls back to the hardcoded version 5.0.0-local. This value is embedded in the assembly at compile time.
2

CI build

On GitHub Actions, the GITHUB_RUN_NUMBER environment variable is automatically provided. MSBuild resolves $(GITHUB_RUN_NUMBER) during compilation, producing a version such as 5.0.123.
3

Branch detection

A shell script in the CI pipeline inspects the branch name. For any branch other than main, it appends the -prerelease suffix, yielding 5.0.123-prerelease.
4

Artifact generation

All outputs — the CLI binary (.tar.gz), the Docker image, and the GitHub Release — are tagged with the same resolved version string.
5

Runtime display

At startup, the CLI reads the AssemblyFileVersionAttribute from the compiled assembly and displays the version to the user. Fallbacks are applied in order: assembly file version → assembly version → "unknown".

Checking the current version

Run either command to print the version of your installed Arius binary:
arius --version
For the Docker image:
docker run --rm woutervanranst/arius --version

Implementation details

Project file (Arius.Cli.csproj)

The version is defined using an MSBuild conditional property:
  • When GITHUB_RUN_NUMBER is set (i.e., running in GitHub Actions), the version resolves to 5.0.$(GITHUB_RUN_NUMBER).
  • Otherwise it falls back to 5.0.0-local.

Runtime retrieval (Program.cs)

The GetVersion() method reads AssemblyFileVersionAttribute from the compiled assembly at runtime. This is the value displayed to users in the CLI output.

Updating the major or minor version

To increment the major or minor segment (e.g., from 5.0 to 6.0), update both conditional <Version> elements in src/Arius.Cli/Arius.Cli.csproj:
  • Keep the $(GITHUB_RUN_NUMBER) placeholder for CI builds.
  • Keep the -local suffix for the local development fallback.
<!-- CI build -->
<Version Condition="'$(GITHUB_RUN_NUMBER)' != ''">6.0.$(GITHUB_RUN_NUMBER)</Version>

<!-- Local development fallback -->
<Version Condition="'$(GITHUB_RUN_NUMBER)' == ''">6.0.0-local</Version>
Both entries must be updated together. If only one is changed, local builds and CI builds will report different major/minor versions.

Build docs developers (and LLMs) love