From 919610f429af5e87f90dec64b0529ff648cb5bbc Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Wed, 2 Sep 2020 18:53:46 -0700 Subject: [PATCH] Use version.hpp for package versions (#572) * Add version.txt * Add doc generation for template * Add version.hpp parsing and update capabilities to cmake and engsys * Get-SdkVersion -> Get-PkgVersion * Move Update-PkgVersion.ps1 under eng/scripts * Get-PackageVersion -> Get-PkgVersion * Update paths, params, verbosity * Couple fixes to output and make use of new SemVer version * Add fallback support for verison.txt in cases where we still use it to unblock release artifact generation * Use version information in release pipeline * Add workaround to generate storage pipeline artifacts * eng/scripts/ * Write warning * Haven't released storage-file-shares yet according to releases on GitHub * Set release date on changelog.md * Update CHANGELOG.md to indicate this is a test release * Remove fallback exception for storage * Re-add Rick's suggestions * Revert "Remove fallback exception for storage" --- CMakeLists.txt | 3 + cmake-modules/az_version.cmake | 50 ++++++++++ eng/Update-PkgVersion.ps1 | 81 --------------- .../templates/jobs/archetype-sdk-client.yml | 3 +- .../stages/archetype-cpp-release.yml | 2 +- eng/scripts/Get-PkgVersion.ps1 | 38 +++++++ eng/scripts/SdkVersion-Common.ps1 | 15 +++ eng/scripts/Update-PkgVersion.ps1 | 99 +++++++++++++++++++ sdk/core/azure-core/CMakeLists.txt | 3 +- sdk/core/azure-core/version.txt | 1 - .../azure-storage-blobs/CMakeLists.txt | 6 ++ sdk/storage/azure-storage-blobs/version.txt | 2 +- .../azure-storage-common/CMakeLists.txt | 6 ++ sdk/storage/azure-storage-common/version.txt | 2 +- .../CMakeLists.txt | 6 ++ .../azure-storage-files-datalake/version.txt | 2 +- .../azure-storage-files-shares/CMakeLists.txt | 6 ++ sdk/template/azure-template/CHANGELOG.md | 4 +- sdk/template/azure-template/CMakeLists.txt | 3 + 19 files changed, 241 insertions(+), 91 deletions(-) create mode 100644 cmake-modules/az_version.cmake delete mode 100644 eng/Update-PkgVersion.ps1 create mode 100644 eng/scripts/Get-PkgVersion.ps1 create mode 100644 eng/scripts/SdkVersion-Common.ps1 create mode 100644 eng/scripts/Update-PkgVersion.ps1 delete mode 100644 sdk/core/azure-core/version.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a942b6d44..9d84954d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,9 @@ include(global_compile_options) # Documentation automation function include(${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/doxygen_common.cmake) +# Functions for library versions +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/az_version.cmake) + # sub-projects add_subdirectory(sdk/core/performance-stress) add_subdirectory(sdk/core/azure-core) diff --git a/cmake-modules/az_version.cmake b/cmake-modules/az_version.cmake new file mode 100644 index 000000000..9bbe0c434 --- /dev/null +++ b/cmake-modules/az_version.cmake @@ -0,0 +1,50 @@ +# Sets ${AZ_LIBRARY_VERSION} in the parent context with the version value +# constructed from version.hpp. The version.hpp must follow the example in +# templates for version information to parse correctly. + +function(get_az_version VERSION_HPP_FILE) + if(NOT EXISTS ${VERSION_HPP_FILE}) + message(FATAL_ERROR "Missing Version file ${VERSION_HPP_FILE}") + endif() + + file (STRINGS ${VERSION_HPP_FILE} VERSION_H_CONTENT NEWLINE_CONSUME) + message(STATUS "Retrieving version from ${VERSION_HPP_FILE}") + + # Find relevant version parts + string( + REGEX + MATCH + "#define AZURE_[A-Z]+_VERSION_MAJOR ([0-9]+)[ \t\r\n]+#define AZURE_[A-Z]+_VERSION_MINOR ([0-9]+)[ \t\r\n]+#define AZURE_[A-Z]+_VERSION_PATCH ([0-9]+)[ \t\r\n]+#define AZURE_[A-Z]+_VERSION_PRERELEASE \"([a-zA-Z0-9.]*)\"" + VERSION_PARTS + ${VERSION_H_CONTENT}) + + #Ensure we matched as expected. + # MAJOR.MINOR.PATCH are required. + # PRERELEASE is optional. + if(NOT CMAKE_MATCH_1 AND NOT CMAKE_MATCH_2 AND NOT CMAKE_MATCH_3) + message(FATAL_ERROR "Unexpected version format in ${VERSION_HPP_FILE}") + endif() + + set(VERSION_MAJOR ${CMAKE_MATCH_1}) + set(VERSION_MINOR ${CMAKE_MATCH_2}) + set(VERSION_PATCH ${CMAKE_MATCH_3}) + # If there is a prerelease version + if(CMAKE_MATCH_4) + set(VERSION_PRERELEASE ${CMAKE_MATCH_4}) + set( + AZ_LIBRARY_VERSION + "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_PRERELEASE}" + PARENT_SCOPE) + else() + set( + AZ_LIBRARY_VERSION + "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" + PARENT_SCOPE) + endif() + + message(STATUS "VERSION_MAJOR " ${VERSION_MAJOR}) + message(STATUS "VERSION_MINOR " ${VERSION_MINOR}) + message(STATUS "VERSION_PATCH " ${VERSION_PATCH}) + message(STATUS "VERSION_PRERELEASE " ${VERSION_PRERELEASE}) + message(STATUS "AZ_LIBRARY_VERSION " ${AZ_LIBRARY_VERSION}) +endfunction() diff --git a/eng/Update-PkgVersion.ps1 b/eng/Update-PkgVersion.ps1 deleted file mode 100644 index 0bc63d9e7..000000000 --- a/eng/Update-PkgVersion.ps1 +++ /dev/null @@ -1,81 +0,0 @@ -<# -.SYNOPSIS -Bumps up package versions after release - -.DESCRIPTION -This script bumps up package versions following conventions defined at https://github.com/Azure/azure-sdk/blob/master/docs/policies/releases.md#incrementing-after-release-cpp - -.PARAMETER RepoRoot -The Root of the repo - -.PARAMETER ServiceDirectory -The Name of the Service Directory - -.PARAMETER PackageName -The Name of the Package - -.PARAMETER PackageDirName -Used in the case where the package directory name is different from the package name. e.g in cognitiveservice packages - -.PARAMETER NewVersionString -Use this to overide version incement logic and set a version specified by this parameter - - -.EXAMPLE -Updating package version for azure-core -Update-PkgVersion.ps1 -ServiceDirectory core -PackageName azure-core - -Updating package version for azure-core with a specified verion -Update-PkgVersion.ps1 -ServiceDirectory core -PackageName azure-core -NewVersionString 2.0.5 - -#> - -[CmdletBinding()] -Param ( - [ValidateNotNullOrEmpty()] - [string] $RepoRoot = "${PSScriptRoot}/..", - [Parameter(Mandatory=$True)] - [string] $ServiceDirectory, - [Parameter(Mandatory=$True)] - [string] $PackageName, - [string] $PackageDirName, - [string] $NewVersionString -) - -. ${PSScriptRoot}\common\scripts\SemVer.ps1 - -# Updated Version in version file and changelog using computed or set NewVersionString -function Update-Version([AzureEngSemanticVersion]$SemVer, $Unreleased=$True, $ReplaceVersion=$False) -{ - Write-Verbose "New Version: $SemVer" - if ($SemVer.HasValidPrereleaseLabel() -ne $true){ - Write-Error "Invalid prerelease label" - exit 1 - } - - Set-Content -Path $PackageVersionPath -Value $SemVer.ToString() - - # Increment Version in ChangeLog file - & "${PSScriptRoot}/common/Update-Change-Log.ps1" -Version $SemVer.ToString() -ChangeLogPath $ChangelogPath -Unreleased $Unreleased -ReplaceVersion $ReplaceVersion -} - -# Obtain Current Package Version -if ([System.String]::IsNullOrEmpty($PackageDirName)) {$PackageDirName = $PackageName} -$PackageVersionPath = Join-Path $RepoRoot "sdk" $ServiceDirectory $PackageDirName "version.txt" -$ChangelogPath = Join-Path $RepoRoot "sdk" $ServiceDirectory $PackageDirName "CHANGELOG.md" -$PackageVersion = Get-Content -Path $PackageVersionPath - -if ([System.String]::IsNullOrEmpty($NewVersionString)) -{ - $SemVer = [AzureEngSemanticVersion]::new($PackageVersion) - Write-Verbose "Current Version: ${PackageVersion}" - - $SemVer.IncrementAndSetToPrerelease() - Update-Version -SemVer $SemVer -} -else -{ - # Use specified VersionString - $SemVer = [AzureEngSemanticVersion]::new($NewVersionString) - Update-Version -SemVer $SemVer -Unreleased $False -ReplaceVersion $True -} diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 1bfa0d6f1..ef107e444 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -132,8 +132,7 @@ jobs: - pwsh: | $outputPath = Join-Path -Path $(Build.ArtifactStagingDirectory) packages/${{ artifact.Name }}/package-info.json - # TODO: Read version from a .h file instead of version.txt - $version = Get-Content -Path sdk/${{ parameters.ServiceDirectory }}/${{ artifact.Path }}/version.txt + $version = eng/scripts/Get-PkgVersion -ServiceDirectory ${{ parameters.ServiceDirectory }} -PackageName ${{ artifact.Path }} $outputObject = @{ version = $version.ToString(); name = '${{ artifact.Name }}' } | ConvertTo-Json Set-Content -Path $outputPath -Value $outputObject diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index 02b8e633d..e86226fd2 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -84,7 +84,7 @@ stages: steps: - checkout: self - pwsh: | - eng/Update-PkgVersion.ps1 -ServiceDirectory '${{parameters.ServiceDirectory}}' -PackageName '${{artifact.name}}' + eng/scripts/Update-PkgVersion.ps1 -ServiceDirectory '${{parameters.ServiceDirectory}}' -PackageName '${{artifact.name}}' displayName: Increment package version - template: ../../../common/pipelines/templates/steps/create-pull-request.yml parameters: diff --git a/eng/scripts/Get-PkgVersion.ps1 b/eng/scripts/Get-PkgVersion.ps1 new file mode 100644 index 000000000..af7c13591 --- /dev/null +++ b/eng/scripts/Get-PkgVersion.ps1 @@ -0,0 +1,38 @@ +[CmdletBinding()] +param ( + + [Parameter(Mandatory = $true)] + [string] $ServiceDirectory, + [Parameter(Mandatory = $true)] + [string] $PackageName +) + +. ${PSScriptRoot}/SdkVersion-Common.ps1 + +$versionFileLocation = Get-VersionHppLocaiton ` + -ServiceDirectory $ServiceDirectory ` + -PackageName $PackageName + +if (!$versionFileLocation) { + $fallback = Get-Content $RepoRoot/sdk/$ServiceDirectory/$PackageName/version.txt + if ($fallback) { + return $fallback + } else { + Write-Error "Cannot locate package version" + exit 1 + } +} + +$versionFileContents = Get-Content $versionFileLocation -Raw + +if (!($versionFileContents -match $VersionRegex)) { + Write-Error "does not match version information schema" +} + +$VersionString = if ($Matches.prerelease) { + "$($Matches.major).$($Matches.minor).$($Matches.patch)-$($Matches.prerelease)" +} else { + "$($Matches.major).$($Matches.minor).$($Matches.patch)" +} + +return $VersionString diff --git a/eng/scripts/SdkVersion-Common.ps1 b/eng/scripts/SdkVersion-Common.ps1 new file mode 100644 index 000000000..6e9efbf81 --- /dev/null +++ b/eng/scripts/SdkVersion-Common.ps1 @@ -0,0 +1,15 @@ +# NOTE: Update-PkgVersion and Get-PkgVersion relies on these variables and +# functions +$RepoRoot = "${PSScriptRoot}/../.." +$VersionRegex = '(#define AZURE_\w+_VERSION_MAJOR )(?[0-9]+)(\s+#define AZURE_\w+_VERSION_MINOR )(?[0-9]+)(\s+#define AZURE_\w+_VERSION_PATCH )(?[0-9]+)(\s+#define AZURE_\w+_VERSION_PRERELEASE )"(?[a-zA-Z0-9.]*)"'; + +function Get-VersionHppLocaiton ($ServiceDirectory, $PackageName) { + $versionHppLocation = Get-ChildItem version.hpp -Path "$RepoRoot/sdk/$ServiceDirectory/$PackageName" -Recurse + Write-Verbose "version.hpp location: $versionHppLocation" + + if (!$versionHppLocation) { + Write-Warning "Could not locate version.hpp file in sdk/$ServiceDirectory/$PackageName" + } + + return $versionHppLocation +} diff --git a/eng/scripts/Update-PkgVersion.ps1 b/eng/scripts/Update-PkgVersion.ps1 new file mode 100644 index 000000000..1818fc166 --- /dev/null +++ b/eng/scripts/Update-PkgVersion.ps1 @@ -0,0 +1,99 @@ +<# +.SYNOPSIS +Bumps up package versions after release + +.PARAMETER RepoRoot +The root of the repo (defaults to ${PSScriptRoot}/..) + +.PARAMETER ServiceDirectory +The service directory under /sdk/ used to find version.hpp + +.PARAMETER PackageName +The package name under /sdk/ used to find +version.hpp + +.PARAMETER NewVersionString +New version string to use. Must follow SemVer conventions. + +.DESCRIPTION +This script bumps up package versions following conventions defined at https://github.com/Azure/azure-sdk/blob/master/docs/policies/releases.md#incrementing-after-release-cpp + + +#> + +[CmdletBinding()] +Param ( + [ValidateNotNullOrEmpty()] + [string] $RepoRoot = "${PSScriptRoot}/..", + [Parameter(Mandatory=$True)] + [string] $ServiceDirectory, + [Parameter(Mandatory=$True)] + [string] $PackageName, + [string] $NewVersionString +) + +. ${RepoRoot}\common\scripts\SemVer.ps1 +. ${PSScriptRoot}\SdkVersion-Common.ps1 + +# Updated Version in version file and changelog using computed or set NewVersionString +function Update-Version( + [AzureEngSemanticVersion]$SemVer, + $VersionHppLocation, + $Unreleased=$True, + $ReplaceVersion=$False) +{ + Write-Verbose "New Version: $SemVer" + if ($SemVer.HasValidPrereleaseLabel() -ne $true){ + Write-Error "Invalid prerelease label: $SemVer" + exit 1 + } + + Write-Verbose "Saving version.hpp file..." + $versionHppContent = Get-Content $VersionHppLocation -Raw + + if ($SemVer.IsPrerelease) { + $newContent = $versionHppContent -replace $VersionRegex, "`${1}$($SemVer.Major)`${2}$($SemVer.Minor)`${3}$($SemVer.Patch)`${4}`"$($SemVer.PrereleaseLabel).$($SemVer.PrereleaseNumber)`"" + } else { + $newContent = $versionHppContent -replace $VersionRegex, "`${1}$($SemVer.Major)`${2}$($SemVer.Minor)`${3}$($SemVer.Patch)`${4}`"`"" + } + + $newContent | Set-Content $VersionHppLocation + + # Set Version in ChangeLog file + $ChangelogPath = Join-Path $RepoRoot "sdk" $ServiceDirectory $PackageName "CHANGELOG.md" + & "${RepoRoot}/eng/common/Update-Change-Log.ps1" ` + -Version $SemVer.ToString() ` + -ChangeLogPath $ChangelogPath ` + -Unreleased $Unreleased ` + -ReplaceVersion $ReplaceVersion +} + +$versionHppLocation = Get-VersionHppLocaiton ` + -ServiceDirectory $ServiceDirectory ` + -PackageName $PackageName + +Write-Verbose "VERSION FILE: $versionHppLocation" + +# Obtain Current Package Version +if ([System.String]::IsNullOrEmpty($NewVersionString)) +{ + $PackageVersion = & $PSScriptRoot/Get-PkgVersion.ps1 ` + -ServiceDirectory $ServiceDirectory ` + -PackageName $PackageName + + $SemVer = [AzureEngSemanticVersion]::new($PackageVersion) + Write-Verbose "Current Version: ${PackageVersion}" + $SemVer.IncrementAndSetToPrerelease() + Update-Version -SemVer $SemVer -VersionHppLocation $versionHppLocation +} +else +{ + # Use specified VersionString + $SemVer = [AzureEngSemanticVersion]::new($NewVersionString) + Update-Version ` + -SemVer $SemVer ` + -VersionHppLocation $versionHppLocation ` + -Unreleased $False ` + -ReplaceVersion $True +} + diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index e9f3f5c75..f255d250b 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -42,4 +42,5 @@ add_library (Azure::Core ALIAS ${TARGET_NAME}) target_include_directories(${TARGET_NAME} PUBLIC ${CURL_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} PRIVATE CURL::libcurl) -generate_documentation(${TARGET_NAME} 1.0.0-preview.1) +get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/core/version.hpp") +generate_documentation(azure-core ${AZ_LIBRARY_VERSION}) diff --git a/sdk/core/azure-core/version.txt b/sdk/core/azure-core/version.txt deleted file mode 100644 index 5fd76192a..000000000 --- a/sdk/core/azure-core/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.0-preview.1 diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt index f3e469520..c187f81a9 100644 --- a/sdk/storage/azure-storage-blobs/CMakeLists.txt +++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt @@ -30,6 +30,12 @@ set (AZURE_STORAGE_BLOB_SOURCE add_library(azure-storage-blobs ${AZURE_STORAGE_BLOB_HEADER} ${AZURE_STORAGE_BLOB_SOURCE}) target_include_directories(azure-storage-blobs PUBLIC inc) target_link_libraries(azure-storage-blobs azure::storage::common) + +# TODO: Do not read from version.txt, use version.hpp and replace this file +# command with: +# get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage//version.hpp") +# Access the variable from this function using ${AZ_LIBRARY_VERSION} +# Look at the CMakeLists.txt for template package for example usage file(READ version.txt AZURE_STORAGE_BLOBS_PACKAGE_VERSION) target_compile_definitions(azure-storage-common PUBLIC AZURE_STORAGE_BLOBS_PACKAGE_VERSION="${AZURE_STORAGE_BLOBS_PACKAGE_VERSION}") message("Azure Storage Blobs Package Version ${AZURE_STORAGE_BLOBS_PACKAGE_VERSION}") diff --git a/sdk/storage/azure-storage-blobs/version.txt b/sdk/storage/azure-storage-blobs/version.txt index ebb5fbf54..d22846d6d 100644 --- a/sdk/storage/azure-storage-blobs/version.txt +++ b/sdk/storage/azure-storage-blobs/version.txt @@ -1 +1 @@ -1.0.0-beta.1 \ No newline at end of file +1.0.0-beta.2 \ No newline at end of file diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt index f264b7171..351eea289 100644 --- a/sdk/storage/azure-storage-common/CMakeLists.txt +++ b/sdk/storage/azure-storage-common/CMakeLists.txt @@ -54,6 +54,12 @@ else() find_package(OpenSSL REQUIRED) target_link_libraries(azure-storage-common OpenSSL::SSL OpenSSL::Crypto) endif() + +# TODO: Do not read from version.txt, use version.hpp and replace this file +# command with: +# get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage//version.hpp") +# Access the variable from this function using ${AZ_LIBRARY_VERSION} +# Look at the CMakeLists.txt for template package for example usage file(READ version.txt AZURE_STORAGE_COMMON_PACKAGE_VERSION) target_compile_definitions(azure-storage-common PUBLIC AZURE_STORAGE_COMMON_PACKAGE_VERSION="${AZURE_STORAGE_COMMON_PACKAGE_VERSION}") message("Azure Storage Common Package Version ${AZURE_STORAGE_COMMON_PACKAGE_VERSION}") diff --git a/sdk/storage/azure-storage-common/version.txt b/sdk/storage/azure-storage-common/version.txt index ebb5fbf54..d22846d6d 100644 --- a/sdk/storage/azure-storage-common/version.txt +++ b/sdk/storage/azure-storage-common/version.txt @@ -1 +1 @@ -1.0.0-beta.1 \ No newline at end of file +1.0.0-beta.2 \ No newline at end of file diff --git a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt index bad6533bf..4415be278 100644 --- a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +++ b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt @@ -29,6 +29,12 @@ set (AZURE_STORAGE_DATALAKE_SOURCE add_library(azure-storage-files-datalake ${AZURE_STORAGE_DATALAKE_HEADER} ${AZURE_STORAGE_DATALAKE_SOURCE}) target_include_directories(azure-storage-files-datalake PUBLIC inc) target_link_libraries(azure-storage-files-datalake azure-storage-blobs) + +# TODO: Do not read from version.txt, use version.hpp and replace this file +# command with: +# get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage//version.hpp") +# Access the variable from this function using ${AZ_LIBRARY_VERSION} +# Look at the CMakeLists.txt for template package for example usage file(READ version.txt AZURE_STORAGE_FILES_DATALAKE_PACKAGE_VERSION) target_compile_definitions(azure-storage-common PUBLIC AZURE_STORAGE_FILES_DATALAKE_PACKAGE_VERSION="${AZURE_STORAGE_FILES_DATALAKE_PACKAGE_VERSION}") message("Azure Storage Files DataLake Package Version ${AZURE_STORAGE_FILES_DATALAKE_PACKAGE_VERSION}") diff --git a/sdk/storage/azure-storage-files-datalake/version.txt b/sdk/storage/azure-storage-files-datalake/version.txt index ebb5fbf54..d22846d6d 100644 --- a/sdk/storage/azure-storage-files-datalake/version.txt +++ b/sdk/storage/azure-storage-files-datalake/version.txt @@ -1 +1 @@ -1.0.0-beta.1 \ No newline at end of file +1.0.0-beta.2 \ No newline at end of file diff --git a/sdk/storage/azure-storage-files-shares/CMakeLists.txt b/sdk/storage/azure-storage-files-shares/CMakeLists.txt index 259ce0ce2..3a1699596 100644 --- a/sdk/storage/azure-storage-files-shares/CMakeLists.txt +++ b/sdk/storage/azure-storage-files-shares/CMakeLists.txt @@ -26,6 +26,12 @@ set (AZURE_STORAGE_SHARES_SOURCE add_library(azure-storage-files-shares ${AZURE_STORAGE_SHARES_HEADER} ${AZURE_STORAGE_SHARES_SOURCE}) target_include_directories(azure-storage-files-shares PUBLIC inc) target_link_libraries(azure-storage-files-shares azure-storage-common) + +# TODO: Do not read from version.txt, use version.hpp and replace this file +# command with: +# get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage//version.hpp") +# Access the variable from this function using ${AZ_LIBRARY_VERSION} +# Look at the CMakeLists.txt for template package for example usage file(READ version.txt AZURE_STORAGE_FILES_SHARES_PACKAGE_VERSION) target_compile_definitions(azure-storage-common PUBLIC AZURE_STORAGE_FILES_SHARES_PACKAGE_VERSION="${AZURE_STORAGE_FILES_SHARES_PACKAGE_VERSION}") message("Azure Storage Files Shares Package Version ${AZURE_STORAGE_FILES_SHARES_PACKAGE_VERSION}") diff --git a/sdk/template/azure-template/CHANGELOG.md b/sdk/template/azure-template/CHANGELOG.md index cae13767f..6d13270db 100644 --- a/sdk/template/azure-template/CHANGELOG.md +++ b/sdk/template/azure-template/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2020-09-01) -* Template package +* Template package validating release pipeline diff --git a/sdk/template/azure-template/CMakeLists.txt b/sdk/template/azure-template/CMakeLists.txt index ef915e315..92b2fbbcb 100644 --- a/sdk/template/azure-template/CMakeLists.txt +++ b/sdk/template/azure-template/CMakeLists.txt @@ -23,3 +23,6 @@ if(BUILD_TESTING) # tests add_subdirectory(test) endif() + +get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/template/version.hpp") +generate_documentation(azure-template ${AZ_LIBRARY_VERSION})