Skip to content
Merged
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
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ Next
- [Signaling NaNs will from now on be encoded as canonical quiet NaNs](https://github.com/PJK/libcbor/pull/335). This was already the existing behavior for half-precision floats
- Decoding is unchanged
- Please note that this is an intermediate state and likely to be revisited (https://github.com/PJK/libcbor/issues/336)
- [Make build compatible with CMake FetchContent](https://github.com/PJK/libcbor/pull/341) (by [Jan200101](https://github.com/Jan200101))
- [Support Bzlmod for Bazel builds](https://github.com/PJK/libcbor/pull/340)
- This should significantly simplify including libcbor as a dependency/module in Bazel projects, see https://bazel.build/external/migration
- Code quality improvements
- [Fix compiler pragmas](https://github.com/PJK/libcbor/pull/347) (by [brooksdavis](https://github.com/brooksdavis))
- [Fix code style issues](https://github.com/PJK/libcbor/pull/321)
- [Fixed bug in cbor2cjson example](https://github.com/PJK/libcbor/pull/338) (by [whitehse](https://github.com/whitehse))

0.11.0 (2024-02-04)
---------------------
- [Updated documentation to refer to RFC 8949](https://github.com/PJK/libcbor/issues/269)
- Improvements to `cbor_describe`
- [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth)
- [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth)
- [Formatting consistency and clarity improvements](https://github.com/PJK/libcbor/pull/285)
- [Fix `cbor_string_set_handle` not setting the codepoint count](https://github.com/PJK/libcbor/pull/286)
- BREAKING: [`cbor_load` will no longer fail on input strings that are well-formed but not valid UTF-8](https://github.com/PJK/libcbor/pull/286)
Expand Down
14 changes: 7 additions & 7 deletions misc/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def replace(file_path, pattern, replacement):

# Update CMakeLists.txt
replace('CMakeLists.txt',
'''SET\\(CBOR_VERSION_MAJOR "\d+"\\)
SET\\(CBOR_VERSION_MINOR "\d+"\\)
SET\\(CBOR_VERSION_PATCH "\d+"\\)''',
f'''SET(CBOR_VERSION_MAJOR "{major}")
SET(CBOR_VERSION_MINOR "{minor}")
SET(CBOR_VERSION_PATCH "{patch}")''')
r'''set\(CBOR_VERSION_MAJOR "\d+"\)
set\(CBOR_VERSION_MINOR "\d+"\)
set\(CBOR_VERSION_PATCH "\d+"\)''',
f'''set(CBOR_VERSION_MAJOR "{major}")
set(CBOR_VERSION_MINOR "{minor}")
set(CBOR_VERSION_PATCH "{patch}")''')

# Update Basel build example
replace('examples/bazel/third_party/libcbor/cbor/configuration.h',
'''#define CBOR_MAJOR_VERSION \d+
r'''#define CBOR_MAJOR_VERSION \d+
#define CBOR_MINOR_VERSION \d+
#define CBOR_PATCH_VERSION \d+''',
f'''#define CBOR_MAJOR_VERSION {major}
Expand Down
19 changes: 17 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Guides my forgetful self through the release process.
# Usage release.sh VERSION
# Usage: release.sh 0.42.0

set -e

Expand All @@ -17,9 +17,16 @@ function prompt() {
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OUTDIR=$(mktemp -d)
TAG_NAME="v$1"
BRANCH_NAME="release-$1"


echo ">>>>> Bumping version"
cd $DIR
git checkout -b "$BRANCH_NAME"
python3 misc/update_version.py "$1"
git commit -a -m "Bump version to $1"
git log -2
prompt "Check the repository state, everything looks good?"

echo ">>>>> Checking changelog"
grep -A 10 -F "$1" CHANGELOG.md || true
Expand All @@ -30,7 +37,7 @@ grep PROJECT_NUMBER Doxyfile
prompt "Is the Doxyfile version correct?"

echo ">>>>> Checking CMakeLists"
grep -A 2 'SET(CBOR_VERSION_MAJOR' CMakeLists.txt
grep -A 2 'set(CBOR_VERSION_MAJOR' CMakeLists.txt
prompt "Is the CMake version correct?"

echo ">>>>> Checking Bazel build"
Expand Down Expand Up @@ -64,6 +71,14 @@ make
ctest
popd

echo ">>>>> Pushing version bump branch"
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
echo "Open and merge PR: https://github.com/PJK/libcbor/pull/new/${BRANCH_NAME}"
prompt "Did you merge the PR?"

git checkout master
git pull

prompt "Will proceed to tag the release with $TAG_NAME."
git commit -a -m "Release $TAG_NAME"
git tag "$TAG_NAME"
Expand Down