From b6c828f8b5b6fefe7f126cf474d1716d067d4eef Mon Sep 17 00:00:00 2001 From: Jerry Leung Date: Wed, 24 Mar 2021 20:26:33 -0700 Subject: [PATCH 1/4] Update filename and version --- src/CMakeLists.txt | 4 ++-- src/installer/CMakeLists.txt | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 63485c77c..3a284e205 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -78,8 +78,8 @@ set(INSTALL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/installer") set(DSN_INSTALLER_SRC "${CMAKE_CURRENT_SOURCE_DIR}/DSNInstaller") # ODBC Driver version -set(DRIVER_PACKAGE_VERSION "0.1.0") -set(DRIVER_PACKAGE_VERSION_COMMA_SEPARATED "0,1,0") +set(DRIVER_PACKAGE_VERSION "0.2.0") +set(DRIVER_PACKAGE_VERSION_COMMA_SEPARATED "0,2,0") add_compile_definitions( TS_ODBC_VERSION="${DRIVER_PACKAGE_VERSION}" # Comma separated version is required for odbc administrator's driver file. TS_ODBC_DRVFILE_VERSION=${DRIVER_PACKAGE_VERSION_COMMA_SEPARATED} ) diff --git a/src/installer/CMakeLists.txt b/src/installer/CMakeLists.txt index 6adf28e82..9d712c950 100644 --- a/src/installer/CMakeLists.txt +++ b/src/installer/CMakeLists.txt @@ -20,12 +20,17 @@ set(CMAKE_INSTALL_PREFIX ${INSTALL_ROOT}) # General package info set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Amazon Timestream ODBC Driver ${BITNESS}-bit") +if(WIN32) + set(CPACK_PACKAGE_NAME "AmazonTimestreamODBC${BITNESS}-${CPACK_PACKAGE_VERSION}") +else() + set(CPACK_PACKAGE_NAME "AmazonTimestreamODBC-${CPACK_PACKAGE_VERSION}") +endif() +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_NAME}") set(CPACK_PACKAGE_VENDOR "Amazon") set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") set(CPACK_PACKAGE_VERSION "${DRIVER_PACKAGE_VERSION}") - +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") # OS-specific package info if(WIN32) # Set generator to WIX From 978226c71a4ba9fb55b3619374d641f8331bb339 Mon Sep 17 00:00:00 2001 From: Jerry Leung Date: Thu, 25 Mar 2021 13:20:51 -0700 Subject: [PATCH 2/4] Addressed code review --- src/installer/CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/installer/CMakeLists.txt b/src/installer/CMakeLists.txt index 9d712c950..bf8675015 100644 --- a/src/installer/CMakeLists.txt +++ b/src/installer/CMakeLists.txt @@ -19,18 +19,25 @@ include(CPackComponent) set(CMAKE_INSTALL_PREFIX ${INSTALL_ROOT}) # General package info -set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit") +set(CPACK_PACKAGE_VERSION "${DRIVER_PACKAGE_VERSION}") if(WIN32) - set(CPACK_PACKAGE_NAME "AmazonTimestreamODBC${BITNESS}-${CPACK_PACKAGE_VERSION}") + set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC${BITNESS}-${CPACK_PACKAGE_VERSION}") + set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit ${CPACK_PACKAGE_VERSION}") +elseif(APPLE) + set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${CPACK_PACKAGE_VERSION}") + set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${CPACK_PACKAGE_VERSION}") else() - set(CPACK_PACKAGE_NAME "AmazonTimestreamODBC-${CPACK_PACKAGE_VERSION}") + if(${BITNESS} EQUAL 32) + set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${BITNESS}-bit-${CPACK_PACKAGE_VERSION}.i686") + else() + set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${BITNESS}-bit-${CPACK_PACKAGE_VERSION}.x86_64") + endif() + set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit ${CPACK_PACKAGE_VERSION}") endif() set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_NAME}") set(CPACK_PACKAGE_VENDOR "Amazon") set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") -set(CPACK_PACKAGE_VERSION "${DRIVER_PACKAGE_VERSION}") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") # OS-specific package info if(WIN32) # Set generator to WIX From 80f682b3a87071353234ecc27c3715e051977691 Mon Sep 17 00:00:00 2001 From: Jerry Leung Date: Thu, 25 Mar 2021 14:08:44 -0700 Subject: [PATCH 3/4] Addressed code review comments --- src/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a284e205..35f05d569 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -78,8 +78,11 @@ set(INSTALL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/installer") set(DSN_INSTALLER_SRC "${CMAKE_CURRENT_SOURCE_DIR}/DSNInstaller") # ODBC Driver version -set(DRIVER_PACKAGE_VERSION "0.2.0") -set(DRIVER_PACKAGE_VERSION_COMMA_SEPARATED "0,2,0") +set(MAJOR 0) +set(MINOR 2) +set(PATCH 0) +set(DRIVER_PACKAGE_VERSION "${MAJOR}.${MINOR}.${PATCH}") +set(DRIVER_PACKAGE_VERSION_COMMA_SEPARATED "${MAJOR},${MINOR},${PATCH}") add_compile_definitions( TS_ODBC_VERSION="${DRIVER_PACKAGE_VERSION}" # Comma separated version is required for odbc administrator's driver file. TS_ODBC_DRVFILE_VERSION=${DRIVER_PACKAGE_VERSION_COMMA_SEPARATED} ) From 9cd5fb0462f8693c1e7a2989b9df4299a9993d0a Mon Sep 17 00:00:00 2001 From: Jerry Leung Date: Thu, 25 Mar 2021 17:53:48 -0700 Subject: [PATCH 4/4] Addressed spacing issues --- src/installer/CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/installer/CMakeLists.txt b/src/installer/CMakeLists.txt index bf8675015..ed2e7ca9e 100644 --- a/src/installer/CMakeLists.txt +++ b/src/installer/CMakeLists.txt @@ -22,17 +22,17 @@ set(CMAKE_INSTALL_PREFIX ${INSTALL_ROOT}) set(CPACK_PACKAGE_VERSION "${DRIVER_PACKAGE_VERSION}") if(WIN32) set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC${BITNESS}-${CPACK_PACKAGE_VERSION}") - set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit ${CPACK_PACKAGE_VERSION}") + set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit ${CPACK_PACKAGE_VERSION}") elseif(APPLE) set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${CPACK_PACKAGE_VERSION}") - set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${CPACK_PACKAGE_VERSION}") + set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${CPACK_PACKAGE_VERSION}") else() - if(${BITNESS} EQUAL 32) - set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${BITNESS}-bit-${CPACK_PACKAGE_VERSION}.i686") - else() - set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${BITNESS}-bit-${CPACK_PACKAGE_VERSION}.x86_64") - endif() - set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit ${CPACK_PACKAGE_VERSION}") + if(${BITNESS} EQUAL 32) + set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${BITNESS}-bit-${CPACK_PACKAGE_VERSION}.i686") + else() + set(CPACK_PACKAGE_FILE_NAME "AmazonTimestreamODBC-${BITNESS}-bit-${CPACK_PACKAGE_VERSION}.x86_64") + endif() + set(CPACK_PACKAGE_NAME "Amazon Timestream ODBC Driver ${BITNESS}-bit ${CPACK_PACKAGE_VERSION}") endif() set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_NAME}") set(CPACK_PACKAGE_VENDOR "Amazon")