Skip to content

Commit

Permalink
Adding changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
gershnik committed Dec 13, 2023
1 parent ddadbda commit 968486f
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

### Added
- CoDispatch.h: A collection of classes and functions that allows you to write **asynchronous** C++ coroutines and generators that execute on GCD dispatch queues. Detailed guide is available [here](https://github.com/gershnik/objc-helpers/doc/CoDispatch.md)
- Ability to subtract `NSStringCharAccess::iterator`s
- Ability to get starting index of `NSStringCharAccess::iterator` inside its string
- Extensive unit tests for all functionality

### Fixed
- Crash in `NSNumberEqual` when second argument is `nullptr`
- `NSStringCharAccess::empty()` returning opposite result
- Compiler warnings in pedantic mode

## [1.1] - 2022-08-20

### Fixed

- Suppressing compiler warning on an unused argument

## [1.0] - 2021-06-16

### Added
- Initial version

[1.0]: https://github.com/gershnik/objc-helpers/releases/tag/v1.0
[1.1]: https://github.com/gershnik/objc-helpers/releases/tag/v1.1
35 changes: 35 additions & 0 deletions tools/create-release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#! /usr/bin/env -S python3 -u

import sys
import re
import subprocess

from pathlib import Path
from datetime import date

MYPATH = Path(__file__).parent
ROOT = MYPATH.parent

NEW_VER = sys.argv[1]

unreleased_link_pattern = re.compile(r"^\[Unreleased\]: (.*)$", re.DOTALL)
lines = []
with open(ROOT / "CHANGELOG.md", "rt") as change_log:
for line in change_log.readlines():
# Move Unreleased section to new version
if re.fullmatch(r"^## Unreleased.*$", line, re.DOTALL):
lines.append(line)
lines.append("\n")
lines.append(
f"## [{NEW_VER}] - {date.today().isoformat()}\n"
)
else:
lines.append(line)
lines.append(f'[{NEW_VER}]: https://github.com/gershnik/objc-helpers/releases/v{NEW_VER}\n')

with open(ROOT / "CHANGELOG.md", "wt") as change_log:
change_log.writelines(lines)

subprocess.run(['git', 'add', ROOT / "CHANGELOG.md"], check=True)
subprocess.run(['git', 'commit', '-m', f'chore: creating version {NEW_VER}'], check=True)
subprocess.run(['git', 'tag', f'v{NEW_VER}'], check=True)

0 comments on commit 968486f

Please sign in to comment.