Skip to content

Commit b164464

Browse files
author
Kanchan Shukla
committed
test
1 parent e1b2601 commit b164464

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/macos-release.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ jobs:
8888
8989

9090
- name: Build cpp-bigquery-odbc (Skip Tests)
91-
run: |
92-
TAG=${GITHUB_REF#refs/tags/}
93-
VERSION=${TAG#v}
94-
echo "📦 Building version $VERSION"
95-
91+
run: |
9692
if [ "${{ matrix.os }}" == "macos-14" ]; then
9793
export ODBC_INCLUDE_PATH="/opt/homebrew/opt/libiodbc/include"
9894
else
@@ -103,9 +99,7 @@ jobs:
10399
export LDFLAGS="-L$(brew --prefix libiodbc)/lib -liconv"
104100
export SKIP_TESTS=1
105101
106-
# Pass version to cmake
107-
cmake -S . -B cmake-out -DPROJECT_VERSION=${VERSION}
108-
102+
bash ci/gha/builds/macos-cmake.sh
109103
110104
HEADER_VERSION=$(grep 'FULL_VERSION' cmake-out/google/cloud/odbc/internal/version.h | sed -E 's/.*"([^"]+)".*/\1/')
111105
echo "📦 Tag version: $VERSION"
@@ -117,8 +111,6 @@ jobs:
117111
else
118112
echo "✅ FULL_VERSION matches tag version"
119113
fi
120-
121-
cmake --build cmake-out --parallel
122114
123115
env:
124116
USE_BAZEL_VERSION: 7.0.0

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
cmake_minimum_required(VERSION 3.14)
1818

19-
19+
message( "version of driver ${PROJECT_VERSION}")
2020
# Default version, can be overridden by -DPROJECT_VERSION=x.y.z
2121
if (NOT DEFINED PROJECT_VERSION)
2222
set(PROJECT_VERSION "1.0.0")

ci/dependencies/driver-manager-setup-osx.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ cd "$CPP_GOOGLE_BIGQUERY_ODBC_DRIVER_MANAGER_SETUP_OSX_CURR_DIR"
5151
source "$(dirname "$0")/../lib/init.sh"
5252
source module ci/gha/builds/lib/cmake.sh
5353

54+
# Inside your bash script
55+
TAG="${GITHUB_REF#refs/tags/}" # e.g. v0.0.24
56+
VERSION="${TAG#v}" # e.g. 0.0.24
57+
58+
echo "📦 Version from Git tag: $VERSION"
59+
5460
mapfile -t args < <(cmake::common_args)
5561
args+=(
5662
-DODBC_UNIT_TESTING=OFF
@@ -59,6 +65,7 @@ args+=(
5965
-DCLIENT_LIBRARY_INTEGRATION_TESTING=OFF
6066
-DCMAKE_CXX_FLAGS="-I$(brew --prefix libiodbc)/include"
6167
-DCMAKE_CXX_STANDARD=17
68+
-DPROJECT_VERSION=${VERSION}
6269
)
6370

6471
mapfile -t vcpkg_args < <(cmake::vcpkg_args)

0 commit comments

Comments
 (0)