Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.16)
project(one VERSION 6.3.0 LANGUAGES C CXX)
file(READ "${CMAKE_CURRENT_LIST_DIR}/VERSION" ONE_PROJECT_VERSION)
Copy link
Copy Markdown

@augmentcode augmentcode Bot Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMakeLists.txt:2 file(READ ...) doesn’t automatically cause CMake to reconfigure when VERSION changes, so an existing build directory can keep reporting the old project version until the user manually reruns CMake.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
set_property(DIRECTORY APPEND PROPERTY
CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/VERSION")
string(STRIP "${ONE_PROJECT_VERSION}" ONE_PROJECT_VERSION)
project(one VERSION "${ONE_PROJECT_VERSION}" LANGUAGES C CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

include(DebugSymbols)
Expand Down Expand Up @@ -118,7 +122,11 @@ sourcemeta_target_clang_format(SOURCES
test/*.h test/*.cc
enterprise/*.h enterprise/*.cc)
sourcemeta_target_shellcheck(SOURCES
test/*.sh docker/*.sh enterprise/scripts/*.sh benchmark/*.sh)
release.sh
test/*.sh
docker/*.sh
enterprise/scripts/*.sh
benchmark/*.sh)

if(ONE_TESTS)
enable_testing()
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY src /source/src
COPY contrib /source/contrib
COPY vendor /source/vendor
COPY CMakeLists.txt /source/CMakeLists.txt
COPY VERSION /source/VERSION

# For testing
COPY test/cli /source/test/cli
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.3.0
1 change: 1 addition & 0 deletions enterprise/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ COPY contrib /source/contrib
COPY vendor /source/vendor
COPY DEPENDENCIES /source/DEPENDENCIES
COPY CMakeLists.txt /source/CMakeLists.txt
COPY VERSION /source/VERSION
COPY enterprise /source/enterprise

# For testing
Expand Down
51 changes: 51 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/sh

set -o errexit
set -o nounset

usage() {
echo "Usage: $0 <major|minor|patch>" 1>&2
exit 1
}

if [ "$#" -ne 1 ]; then
usage
fi

BUMP_TYPE="$1"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
VERSION_FILE="${SCRIPT_DIR}/VERSION"

CURRENT_VERSION="$(cat "$VERSION_FILE")"
MAJOR="$(echo "$CURRENT_VERSION" | cut -d . -f1)"
MINOR="$(echo "$CURRENT_VERSION" | cut -d . -f2)"
PATCH="$(echo "$CURRENT_VERSION" | cut -d . -f3)"

case "$BUMP_TYPE" in
major)
MAJOR=$((MAJOR + 1))
MINOR=0
PATCH=0
;;
minor)
MINOR=$((MINOR + 1))
PATCH=0
;;
patch)
PATCH=$((PATCH + 1))
;;
*)
usage
;;
esac

NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
echo "Bumping version: ${CURRENT_VERSION} -> ${NEW_VERSION}"

echo "$NEW_VERSION" > "$VERSION_FILE"

git -C "$SCRIPT_DIR" commit --only --gpg-sign --signoff \
--message "v${NEW_VERSION}" -- VERSION
git -C "$SCRIPT_DIR" tag --sign "v${NEW_VERSION}" --message "v${NEW_VERSION}"
git -C "$SCRIPT_DIR" log -1 --patch
Loading