Skip to content

Commit 6f5b77c

Browse files
committed
fix: Ensure build scripts use correct version from CI environment
- Modified build-spec.sh to prioritize RELEASE_VERSION environment variable - Updated build-deploy.yml to use BOOST_DOC_VERSION when available - Fixes version mismatch where documentation showed wrong version numbers - Ensures release builds show correct v3.1.2 version in documentation
1 parent 1a51112 commit 6f5b77c

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/build-deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ jobs:
5757
run: |
5858
cd drafts/current/specifications
5959
60-
# Extract version using same logic as build script
61-
if git rev-parse --git-dir >/dev/null 2>&1; then
60+
# Extract version from environment or git tags
61+
if [ -n "$BOOST_DOC_VERSION" ] && [ "$BOOST_DOC_VERSION" != "main" ]; then
62+
VERSION="$BOOST_DOC_VERSION"
63+
echo "Using version from environment: $VERSION"
64+
elif git rev-parse --git-dir >/dev/null 2>&1; then
6265
VERSION=$(git describe --tags --abbrev=0 2>/dev/null)
6366
if [ -z "$VERSION" ]; then
6467
SHORT_HASH=$(git rev-parse --short HEAD)

drafts/current/specifications/build-spec.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ set -e # Exit on any error
77

88
echo "🚀 Building BOOST Specification with Direct Dictionary References..."
99

10-
# Extract version from git tags (authoritative source)
11-
echo "🔧 Extracting version from git tags..."
12-
if git rev-parse --git-dir >/dev/null 2>&1; then
10+
# Extract version from environment or git tags (authoritative source)
11+
echo "🔧 Extracting version information..."
12+
13+
# Check if RELEASE_VERSION is set (from CI/CD workflows)
14+
if [ -n "$RELEASE_VERSION" ]; then
15+
VERSION="$RELEASE_VERSION"
16+
echo "📋 Using release version from environment: $VERSION"
17+
elif git rev-parse --git-dir >/dev/null 2>&1; then
1318
# Get the latest version tag, fallback to commit hash if no tags
1419
VERSION=$(git describe --tags --abbrev=0 2>/dev/null)
1520
if [ -z "$VERSION" ]; then

0 commit comments

Comments
 (0)