Skip to content

Commit

Permalink
Add changelog at api and sdk level, abi version for sdk (gabime#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Dec 17, 2020
1 parent 39679b2 commit 652b49a
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ Increment the:


## [Unreleased]

## [0.0.1] 2020-12-16
### Added
* Trace API and SDK
* Trace API and SDK experimental
* OTLP Exporter
### Changed
### Removed
21 changes: 21 additions & 0 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Release History: opentelemetry-api

All notable changes to the api project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Guideline to update the version:
Increment the:
- MAJOR version when you make incompatible API/ABI changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.


## [Unreleased]

## [0.0.1] 2020-12-16
### Added
* Trace API experimental
### Changed
### Removed
6 changes: 3 additions & 3 deletions buildscripts/pre_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ ! -f $changelog_file ]; then
exit 1
fi

if [ ! grep -q "## [Unreleased]" $changelog_file ]; then
if [ ! grep -q "^\#\# \[Unreleased\]$" $changelog_file ]; then
echo "Error: $changelog_file doesn't contain Unreleased information. Please update the file with changes and run this script again."
exit 1
fi
Expand All @@ -59,12 +59,12 @@ fi
# update CHANGELOG.md
date=$(date '+%Y-%m-%d')
sed -i "/\#\# \[Unreleased\]/a\\ \n\#\# \[${tag}\] ${date}" $changelog_file
if [$? -ne 0]; then
if [ $? -ne 0 ]; then
echo "Error: Cannot update CHANGELOG.md file. Update it manually, create the ${tag} and push changes to upstream"
exit 1
fi

git add .
git add CHANGELOG.md
git commit -m "Prepare for releasing ${tag}"

echo "Now validate the chages using git diff master, create the ${tag} and push changes to upstream"
Expand Down
22 changes: 22 additions & 0 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Release History: opentelemetry-sdk

All notable changes to the sdk project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Guideline to update the version:
Increment the:
- MAJOR version when you make incompatible API/ABI changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.


## [Unreleased]

## [0.0.1] 2020-12-16
### Added
* Trace SDK experimental
* OTLP Exporter
### Changed
### Removed
17 changes: 17 additions & 0 deletions sdk/include/opentelemetry/sdk/version/version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#pragma once

#include "opentelemetry/detail/preprocessor.h"

#define OPENTELEMETRY_SDK_ABI_VERSION_NO 0
#define OPENTELEMETRY_SDK_VERSION "0.0.1"
#define OPENTELEMETRY_SDK_ABI_VERSION OPENTELEMETRY_STRINGIFY(OPENTELEMETRY_SDK_ABI_VERSION_NO)

// clang-format off
#define OPENTELEMETRY_SDK_BEGIN_NAMESPACE \
namespace opentelemetry { namespace sdk { inline namespace OPENTELEMETRY_CONCAT(v, OPENTELEMETRY_SDK_ABI_VERSION_NO) {

#define OPENTELEMETRY_SDK_END_NAMESPACE \
}}}

#define OPENTELEMETRY_SDK_NAMESPACE opentelemetry :: sdk :: OPENTELEMETRY_CONCAT(v, OPENTELEMETRY_SDK_ABI_VERSION_NO)

// clang-format on

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
Expand Down

0 comments on commit 652b49a

Please sign in to comment.