diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 7b0ed2115..105034b1c 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -21,7 +21,7 @@ - Renamed methods from `Azure::Core::Context`. - `IsCanceled` to `IsCancelled` - `ThrowIfCanceled` to `ThrowIfCancelled`. - +- Moved `Azure::Core::Version`, defined in `azure/core/version.hpp` to `Azure::Core::Details` namespace in `azure/core/version.hpp` header. ### Bug Fixes diff --git a/sdk/core/azure-core/inc/azure/core/version.hpp b/sdk/core/azure-core/inc/azure/core/version.hpp index 4cc8b6ba6..9ac5ad39e 100644 --- a/sdk/core/azure-core/inc/azure/core/version.hpp +++ b/sdk/core/azure-core/inc/azure/core/version.hpp @@ -15,7 +15,7 @@ #define AZURE_CORE_VERSION_PATCH 0 #define AZURE_CORE_VERSION_PRERELEASE "beta.4" -namespace Azure { namespace Core { +namespace Azure { namespace Core { namespace Details { /** * @brief Provides version information. @@ -46,7 +46,7 @@ namespace Azure { namespace Core { static constexpr const char* secret = AZURE_CORE_VERSION_PRERELEASE; }; -}} // namespace Azure::Core +}}} // namespace Azure::Core::Details #undef AZURE_CORE_VERSION_MAJOR #undef AZURE_CORE_VERSION_MINOR diff --git a/sdk/core/azure-core/src/version.cpp b/sdk/core/azure-core/src/version.cpp index 89ea1305b..7c404fa30 100644 --- a/sdk/core/azure-core/src/version.cpp +++ b/sdk/core/azure-core/src/version.cpp @@ -6,7 +6,7 @@ #include #include -using namespace Azure::Core; +using namespace Azure::Core::Details; const std::string Version::PreRelease = secret; diff --git a/sdk/core/azure-core/test/ut/simplified_header.cpp b/sdk/core/azure-core/test/ut/simplified_header.cpp index 36a010838..4900aa567 100644 --- a/sdk/core/azure-core/test/ut/simplified_header.cpp +++ b/sdk/core/azure-core/test/ut/simplified_header.cpp @@ -22,7 +22,7 @@ TEST(Logging, simplifiedHeader) 1, 1, Azure::Core::Http::HttpStatusCode::Accepted, "phrase")); EXPECT_NO_THROW(Azure::Core::Strings::ToLower("A")); EXPECT_NO_THROW(Azure::Core::Uuid::CreateUuid()); - EXPECT_NO_THROW(Azure::Core::Version::VersionString()); + EXPECT_NO_THROW(Azure::Core::Details::Version::VersionString()); { std::vector buffer(10); diff --git a/sdk/identity/azure-identity/CHANGELOG.md b/sdk/identity/azure-identity/CHANGELOG.md index 7c7756de6..dbcaa4024 100644 --- a/sdk/identity/azure-identity/CHANGELOG.md +++ b/sdk/identity/azure-identity/CHANGELOG.md @@ -2,6 +2,10 @@ ## 1.0.0-beta.2 (Unreleased) +### Breaking Changes + +- Moved `Azure::Identity::Version`, defined in `azure/identity/version.hpp` to `Azure::Identity::Details` namespace in `azure/identity/version.hpp` header. + ### Other changes and Improvements - Add high-level and simplified identity.hpp file for simpler include experience for customers. diff --git a/sdk/identity/azure-identity/inc/azure/identity/version.hpp b/sdk/identity/azure-identity/inc/azure/identity/version.hpp index e33961de0..682f3ad48 100644 --- a/sdk/identity/azure-identity/inc/azure/identity/version.hpp +++ b/sdk/identity/azure-identity/inc/azure/identity/version.hpp @@ -15,7 +15,7 @@ #define AZURE_IDENTITY_VERSION_PATCH 0 #define AZURE_IDENTITY_VERSION_PRERELEASE "beta.2" -namespace Azure { namespace Identity { +namespace Azure { namespace Identity { namespace Details { /** * @brief Provides version information. @@ -46,7 +46,7 @@ namespace Azure { namespace Identity { static constexpr char const* secret = AZURE_IDENTITY_VERSION_PRERELEASE; }; -}} // namespace Azure::Identity +}}} // namespace Azure::Identity::Details #undef AZURE_IDENTITY_VERSION_MAJOR #undef AZURE_IDENTITY_VERSION_MINOR diff --git a/sdk/identity/azure-identity/src/version.cpp b/sdk/identity/azure-identity/src/version.cpp index 897e181de..2310c746b 100644 --- a/sdk/identity/azure-identity/src/version.cpp +++ b/sdk/identity/azure-identity/src/version.cpp @@ -6,7 +6,7 @@ #include #include -using namespace Azure::Identity; +using namespace Azure::Identity::Details; std::string const Version::PreRelease = secret; diff --git a/sdk/template/azure-template/inc/azure/template/version.hpp b/sdk/template/azure-template/inc/azure/template/version.hpp index d4a504aef..2763c660e 100644 --- a/sdk/template/azure-template/inc/azure/template/version.hpp +++ b/sdk/template/azure-template/inc/azure/template/version.hpp @@ -10,14 +10,29 @@ #define AZURE_TEMPLATE_VERSION_PATCH 0 #define AZURE_TEMPLATE_VERSION_PRERELEASE "beta.8" -namespace Azure { namespace Template { +namespace Azure { namespace Template { namespace Details { + /** + * @brief Provides version information. + */ class Version { public: + /// Major numeric identifier. static constexpr int Major = AZURE_TEMPLATE_VERSION_MAJOR; + + /// Minor numeric identifier. static constexpr int Minor = AZURE_TEMPLATE_VERSION_MINOR; + + /// Patch numeric identifier. static constexpr int Patch = AZURE_TEMPLATE_VERSION_PATCH; + + /// Optional pre-release identifier. SDK is in a pre-release state when not empty. static std::string const PreRelease; + + /** + * @brief The version in string format used for telemetry following the `semver.org` standard + * (https://semver.org). + */ static std::string VersionString(); private: @@ -26,7 +41,7 @@ namespace Azure { namespace Template { static constexpr const char* secret = AZURE_TEMPLATE_VERSION_PRERELEASE; }; -}} // namespace Azure::Template +}}} // namespace Azure::Template::Details #undef AZURE_TEMPLATE_VERSION_MAJOR #undef AZURE_TEMPLATE_VERSION_MINOR diff --git a/sdk/template/azure-template/src/template_client.cpp b/sdk/template/azure-template/src/template_client.cpp index 409e21d01..878f18693 100644 --- a/sdk/template/azure-template/src/template_client.cpp +++ b/sdk/template/azure-template/src/template_client.cpp @@ -8,4 +8,4 @@ using namespace Azure::Template; -std::string const TemplateClient::ClientVersion() { return Version::VersionString(); } +std::string const TemplateClient::ClientVersion() { return Details::Version::VersionString(); } diff --git a/sdk/template/azure-template/src/version.cpp b/sdk/template/azure-template/src/version.cpp index fcb8b88a6..d5176ce22 100644 --- a/sdk/template/azure-template/src/version.cpp +++ b/sdk/template/azure-template/src/version.cpp @@ -5,11 +5,11 @@ #include #include -using namespace Azure::Template; +using namespace Azure::Template::Details; const std::string Version::PreRelease = secret; -std::string Azure::Template::Version::VersionString() +std::string Version::VersionString() { static const std::string versionString = [] { std::string version;