Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.1.2 - 2026-03-04
### Fixed
- a couple more issues with setting the version number properly
## v1.1.1 - 2026-03-04
### Fixed
- properly update version number
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (NOT DEFINED LLZK_VERSION_OVERRIDE)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GitVersion.cmake)
get_git_version(LLZK_VERSION)
else()
message(STATUS "LLZK_VERSION_OVERRIDE specified, setting version to ${LLZK_VERSION_OVERRIDE}")
message(WARNING "LLZK_VERSION_OVERRIDE specified, setting version to ${LLZK_VERSION_OVERRIDE}")
set(LLZK_VERSION "${LLZK_VERSION_OVERRIDE}")
endif()

Expand Down
12 changes: 9 additions & 3 deletions cmake/GitVersion.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Fetch the project version from a git version tag.
# Note: if building in a sandbox where git is unavailable (e.g. Nix), pass
# -DLLZK_VERSION_OVERRIDE=<version> to CMake to bypass the call to this function.
function(get_git_version GIT_VERSION_VAR)
execute_process(
COMMAND git describe --tags
Expand All @@ -8,13 +10,17 @@ function(get_git_version GIT_VERSION_VAR)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GIT_VERSION)
# The initial commit to the repository is tagged with `v0.0.0` so this will never fail.
message(FATAL_ERROR "Missing `v0.0.0` tag on initial commit.")
# The initial commit to the repository is tagged with `v0.0.0` so this will never fail except
# in a nix sandbox environment where the version must be passed with `LLZK_VERSION_OVERRIDE`.
message(FATAL_ERROR "Could not find git version tag and `LLZK_VERSION_OVERRIDE` is not set.")
else()
# The output of `git describe --tags` is in the format `vX.Y.Z-N-gHASH` where `vX.Y.Z` is the last tag,
# `N` is the number of commits since the last tag, and `HASH` is the abbreviated commit hash. We need to
# convert this to `X.Y.Z.N` for the LLZK version number.
string(REGEX REPLACE "^v?([0-9]+\\.[0-9]+\\.[0-9]+)-([0-9]+)-g[0-9a-f]+" "\\1.\\2" VERSION_NUMBER "${GIT_VERSION}")
string(REGEX REPLACE "^v?([0-9]+\\.[0-9]+\\.[0-9]+)(-rc[0-9]+)?-([0-9]+)-g[0-9a-f]+" "\\1.\\3" VERSION_NUMBER "${GIT_VERSION}")
# If the current commit is exactly at a tag, the output of `git describe --tags` is just `vX.Y.Z` which
# is not matched by the previous case so handle that as well.
string(REGEX REPLACE "^v" "" VERSION_NUMBER "${VERSION_NUMBER}")
set(${GIT_VERSION_VAR} "${VERSION_NUMBER}" PARENT_SCOPE)
endif()
endfunction()
11 changes: 11 additions & 0 deletions doc/doxygen/06_maintaining.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ so the release version must match the format `v[0-9]+.[0-9]+.[0-9]+`.
> - MINOR version when you add functionality in a backward compatible manner
> - PATCH version when you make backward compatible bug fixes

### Patches

To create a patch branch based on an existing release, you can use the following:

`git checkout -b <new-patch-branch-name> <release-tag>`

## Releasing a New Version

Once a release milestone is met, the release can be created.
Expand Down Expand Up @@ -47,6 +53,7 @@ A new release starts via a manually triggered GitHub workflow.
2. Run scripts from `release-helpers` to update `changelogs/PENDING.md` from files in `changelogs/unreleased/*.yaml`
3. Create a `vx.y.z-pre-release` branch
4. Commit and push changes to the new branch
9. Manually update the version number in `nix/llzk.nix` and commit to the pre-release branch

From this point, any cleanup that needs to be performed (e.g., cleaning up the `changelogs/PENDING.md`) should
be performed by creating PRs against the aforementioned pre-release branch.
Expand All @@ -58,6 +65,10 @@ Once the changelog is updated and the necessary changes have been cherry-picked
the desired version. If there are any issues that need to be addressed at this state, PRs can be opened against
this branch and new release candidates can be created by re-running the `Create Release Candidate` workflow.

At this stage, it can also be helpful to open a draft PR using the pre-release branch and wait for the CI workflows
to run and ensure they are successful. However, it's not strictly required as the release PR created below will
require all CI workflows to pass before it's merged.

### Create the Release

Once a release candidate has been tested and is ready to become a release, run the
Expand Down
6 changes: 5 additions & 1 deletion nix/llzk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
cmakeBuildType ? "Release"
}:

let
version = "1.1.2";
in
stdenv.mkDerivation {
pname = "llzk-${lib.toLower cmakeBuildType}";
version = "0.1.0";
inherit version;
src =
let
src0 = lib.cleanSource (builtins.path {
Expand Down Expand Up @@ -46,6 +49,7 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=${cmakeBuildType}"
"-DLLZK_BUILD_DEVTOOLS=ON"
"-DLLZK_VERSION_OVERRIDE=${version}"
];

# Needed for mlir-tblgen to run properly.
Expand Down
Loading