Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sdk/core/azure-core-xml/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release History

## 1.0.0-beta.1 (2024-01-16)

### Features Added

- Initial release.
66 changes: 66 additions & 0 deletions sdk/core/azure-core-xml/src/private/package_version.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/**
* @file
* @brief Provides version information.
*/

#pragma once

#define AZURE_CORE_XML_VERSION_MAJOR 1
#define AZURE_CORE_XML_VERSION_MINOR 0
#define AZURE_CORE_XML_VERSION_PATCH 0
#define AZURE_CORE_XML_VERSION_PRERELEASE "beta.1"

#define AZURE_CORE_XML_VERSION_ITOA_HELPER(i) #i
#define AZURE_CORE_XML_VERSION_ITOA(i) AZURE_CORE_XML_VERSION_ITOA_HELPER(i)

namespace Azure { namespace Core { namespace _internal { namespace Xml {
/**
* @brief Provides version information.
*/
class PackageVersion final {
public:
/**
* @brief Major numeric identifier.
*/
static constexpr int Major = AZURE_CORE_XML_VERSION_MAJOR;

/**
* @brief Minor numeric identifier.
*/
static constexpr int Minor = AZURE_CORE_XML_VERSION_MINOR;

/**
* @brief Patch numeric identifier.
*/
static constexpr int Patch = AZURE_CORE_XML_VERSION_PATCH;

/**
* @brief Indicates whether the SDK is in a pre-release state.
*/
static constexpr bool IsPreRelease = sizeof(AZURE_CORE_XML_VERSION_PRERELEASE) != sizeof("");

/**
* @brief The version in string format used for telemetry following the `semver.org`
* standard (https://semver.org).
*/
static constexpr const char* ToString()
{
return IsPreRelease
? AZURE_CORE_XML_VERSION_ITOA(AZURE_CORE_XML_VERSION_MAJOR) "." AZURE_CORE_XML_VERSION_ITOA(
AZURE_CORE_XML_VERSION_MINOR) "." AZURE_CORE_XML_VERSION_ITOA(AZURE_CORE_XML_VERSION_PATCH) "-" AZURE_CORE_XML_VERSION_PRERELEASE
: AZURE_CORE_XML_VERSION_ITOA(AZURE_CORE_XML_VERSION_MAJOR) "." AZURE_CORE_XML_VERSION_ITOA(
AZURE_CORE_XML_VERSION_MINOR) "." AZURE_CORE_XML_VERSION_ITOA(AZURE_CORE_XML_VERSION_PATCH);
}
};
}}}} // namespace Azure::Core::_internal::Xml

#undef AZURE_CORE_XML_VERSION_ITOA_HELPER
#undef AZURE_CORE_XML_VERSION_ITOA

#undef AZURE_CORE_XML_VERSION_MAJOR
#undef AZURE_CORE_XML_VERSION_MINOR
#undef AZURE_CORE_XML_VERSION_PATCH
#undef AZURE_CORE_XML_VERSION_PRERELEASE