Skip to content

Truly independent web browser

CI+Meta+UI: Version releases as year.month.patch without a stage

Jelle Raaijmakerse3ac391488a9
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index 956c3c3515c..7083e553c33 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
version:
- description: 'Version to build, such as 2026.11.1 or 2027.1.4.alpha'
+ description: 'Version to build, such as 2026.11.0'
required: true
type: string
ref:
diff --git a/Documentation/AdvancedBuildInstructions.md b/Documentation/AdvancedBuildInstructions.md
index 0c904b15382..2cb7e227325 100644
--- a/Documentation/AdvancedBuildInstructions.md
+++ b/Documentation/AdvancedBuildInstructions.md
@@ -49,7 +49,7 @@ There are some optional features that can be enabled during compilation that are
- `LADYBIRD_ENABLE_CPPTRACE`: uses cpptrace for stack traces when it is available, and `backtrace.h` otherwise. Enabled by default.
- `LADYBIRD_GENERATE_SYMBOL_FILES`: builds with debug information and writes the symbols of the installed executables to separate files. Enabled by the `Distribution` preset. Not supported with MSVC-style toolchains.
- `LADYBIRD_GENERATE_DSYM`: generates dSYM bundles for executables and libraries on macOS.
-- `LADYBIRD_VERSION`: sets the version of a release, as year.month.patch optionally followed by `.alpha` or `.beta`, such as `2026.11.1`. Empty for development builds.
+- `LADYBIRD_VERSION`: sets the version of a release, as year.month.patch, such as `2026.11.0`. Empty for development builds.
- `ENABLE_INSTALL_HEADERS`: installs the headers of the libraries. Enabled by default.
- `ENABLE_INSTALL_FREEDESKTOP_FILES`: installs the desktop entry, D-Bus service, icon and AppStream metainfo files. Enabled by default on Linux and the BSDs.
diff --git a/Meta/CMake/cmake_options.cmake b/Meta/CMake/cmake_options.cmake
index c4d529da27c..0a974713854 100644
--- a/Meta/CMake/cmake_options.cmake
+++ b/Meta/CMake/cmake_options.cmake
@@ -41,23 +41,18 @@ if (LADYBIRD_GENERATE_SYMBOL_FILES AND MSVC)
endif()
option(ENABLE_CI_BASELINE_CPU "Use a common CPU baseline for portable binaries and ccache sharing" OFF)
-set(LADYBIRD_VERSION "" CACHE STRING "Version of a release: year.month.patch, optionally followed by .alpha or .beta")
-set(LADYBIRD_BUNDLE_VERSION "${PROJECT_VERSION}")
-set(LADYBIRD_PACKAGE_VERSION "${PROJECT_VERSION}")
+set(LADYBIRD_VERSION "" CACHE STRING "Version of a release: year.month.patch")
+set(LADYBIRD_BROWSER_VERSION "${PROJECT_VERSION}")
if (NOT LADYBIRD_VERSION STREQUAL "")
- if (NOT LADYBIRD_VERSION MATCHES "^([0-9][0-9][0-9][0-9]\\.([1-9]|1[0-2])\\.(0|[1-9][0-9]*))(\\.alpha|\\.beta)?$")
- message(FATAL_ERROR "LADYBIRD_VERSION must be year.month.patch, optionally followed by .alpha or .beta: "
- "${LADYBIRD_VERSION}")
+ if (NOT LADYBIRD_VERSION MATCHES "^[0-9][0-9][0-9][0-9]\\.([1-9]|1[0-2])\\.(0|[1-9][0-9]*)$")
+ message(FATAL_ERROR "LADYBIRD_VERSION must be year.month.patch: ${LADYBIRD_VERSION}")
endif()
-
- # macOS compares bundle versions as numbers, so they leave out the suffix.
- set(LADYBIRD_BUNDLE_VERSION "${CMAKE_MATCH_1}")
-
- # Debian and RPM sort a tilde before everything else, which puts 2026.12.3~beta before 2026.12.3.
- string(REPLACE "." "~" package_version_suffix "${CMAKE_MATCH_4}")
- set(LADYBIRD_PACKAGE_VERSION "${CMAKE_MATCH_1}${package_version_suffix}")
+ set(LADYBIRD_BROWSER_VERSION "${LADYBIRD_VERSION}")
endif()
+# The stage of development that releases are in, if any, such as Alpha or Beta.
+set(LADYBIRD_RELEASE_STAGE "Alpha")
+
# Like other browsers, our Linux packages keep Ladybird in a directory of its own.
set(LADYBIRD_PACKAGE_INSTALL_PREFIX "/opt/ladybird")
diff --git a/Meta/CMake/packaging.cmake b/Meta/CMake/packaging.cmake
index 44f62c7615a..7a6d7f8be98 100644
--- a/Meta/CMake/packaging.cmake
+++ b/Meta/CMake/packaging.cmake
@@ -21,7 +21,7 @@ set(CPACK_PACKAGE_FILE_NAME "ladybird-${ladybird_package_name}")
set(CPACK_ARCHIVE_LADYBIRD_RUNTIME_FILE_NAME "ladybird-${ladybird_package_name}")
set(CPACK_ARCHIVE_LADYBIRD_SYMBOLS_FILE_NAME "ladybird-symbols-${ladybird_package_name}")
-set(CPACK_PACKAGE_VERSION "${LADYBIRD_PACKAGE_VERSION}")
+set(CPACK_PACKAGE_VERSION "${LADYBIRD_BROWSER_VERSION}")
set(CPACK_PACKAGE_VENDOR "Ladybird Browser Initiative")
set(CPACK_PACKAGE_CONTACT "Ladybird Browser Initiative <[email protected]>")
set(CPACK_PACKAGE_DESCRIPTION
@@ -39,7 +39,7 @@ set(CPACK_DEBIAN_BROWSER_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
set(CPACK_DEBIAN_BROWSER_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_DEBUGSYMBOLS_PACKAGE_NAME ladybird-dbgsym)
set(CPACK_DEBIAN_DEBUGSYMBOLS_PACKAGE_SECTION debug)
-set(CPACK_DEBIAN_DEBUGSYMBOLS_PACKAGE_DEPENDS "ladybird (= ${LADYBIRD_PACKAGE_VERSION})")
+set(CPACK_DEBIAN_DEBUGSYMBOLS_PACKAGE_DEPENDS "ladybird (= ${LADYBIRD_BROWSER_VERSION})")
set(CPACK_DEBIAN_DEBUGSYMBOLS_DESCRIPTION "Debug symbols for Ladybird, which debuggers find by build ID.")
set(CPACK_RPM_COMPONENT_INSTALL ON)
@@ -48,7 +48,7 @@ set(CPACK_RPM_PACKAGE_LICENSE "BSD-2-Clause")
set(CPACK_RPM_BROWSER_PACKAGE_NAME ladybird)
set(CPACK_RPM_BROWSER_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
set(CPACK_RPM_DEBUGSYMBOLS_PACKAGE_NAME ladybird-debuginfo)
-set(CPACK_RPM_DEBUGSYMBOLS_PACKAGE_REQUIRES "ladybird = ${LADYBIRD_PACKAGE_VERSION}")
+set(CPACK_RPM_DEBUGSYMBOLS_PACKAGE_REQUIRES "ladybird = ${LADYBIRD_BROWSER_VERSION}")
set(CPACK_RPM_DEBUGSYMBOLS_PACKAGE_AUTOREQPROV OFF)
set(CPACK_RPM_DEBUGSYMBOLS_PACKAGE_SUMMARY "Debug symbols for Ladybird")
set(CPACK_RPM_DEBUGSYMBOLS_PACKAGE_DESCRIPTION "Debug symbols for Ladybird, which debuggers find by build ID.")
diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt
index 29ffaa944ca..fc47d8adead 100644
--- a/UI/CMakeLists.txt
+++ b/UI/CMakeLists.txt
@@ -22,8 +22,8 @@ function(create_ladybird_bundle target_name)
set_target_properties(${target_name} PROPERTIES
OUTPUT_NAME "Ladybird"
MACOSX_BUNDLE_GUI_IDENTIFIER org.ladybird.Ladybird
- MACOSX_BUNDLE_BUNDLE_VERSION ${LADYBIRD_BUNDLE_VERSION}
- MACOSX_BUNDLE_SHORT_VERSION_STRING ${LADYBIRD_BUNDLE_VERSION}
+ MACOSX_BUNDLE_BUNDLE_VERSION ${LADYBIRD_BROWSER_VERSION}
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${LADYBIRD_BROWSER_VERSION}
MACOSX_BUNDLE_INFO_PLIST "${LADYBIRD_SOURCE_DIR}/UI/Info.plist"
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
diff --git a/UI/cmake/InstallRules.cmake b/UI/cmake/InstallRules.cmake
index 59dc70d98e3..d80de58434d 100644
--- a/UI/cmake/InstallRules.cmake
+++ b/UI/cmake/InstallRules.cmake
@@ -205,18 +205,14 @@ if (ENABLE_INSTALL_FREEDESKTOP_FILES OR LINUX)
set(METAINFO_RELEASE_VERSION "${CMAKE_PROJECT_VERSION}-snapshot-${GIT_HASH}")
set(METAINFO_RELEASE_TYPE "snapshot")
set(METAINFO_RELEASE_DESCRIPTION "Development snapshot.")
- elseif (LADYBIRD_VERSION MATCHES "\\.alpha$")
- set(METAINFO_RELEASE_VERSION "${LADYBIRD_PACKAGE_VERSION}")
- set(METAINFO_RELEASE_TYPE "development")
- set(METAINFO_RELEASE_DESCRIPTION "Alpha release.")
- elseif (LADYBIRD_VERSION MATCHES "\\.beta$")
- set(METAINFO_RELEASE_VERSION "${LADYBIRD_PACKAGE_VERSION}")
- set(METAINFO_RELEASE_TYPE "development")
- set(METAINFO_RELEASE_DESCRIPTION "Beta release.")
- else()
+ elseif (LADYBIRD_RELEASE_STAGE STREQUAL "")
set(METAINFO_RELEASE_VERSION "${LADYBIRD_VERSION}")
set(METAINFO_RELEASE_TYPE "stable")
set(METAINFO_RELEASE_DESCRIPTION "Stable release.")
+ else()
+ set(METAINFO_RELEASE_VERSION "${LADYBIRD_VERSION}")
+ set(METAINFO_RELEASE_TYPE "development")
+ set(METAINFO_RELEASE_DESCRIPTION "${LADYBIRD_RELEASE_STAGE} release.")
endif()
configure_file("${FREEDESKTOP_RESOURCE_DIR}/org.ladybird.Ladybird.metainfo.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/org.ladybird.Ladybird.metainfo.xml" @ONLY)
endif()