Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
feat: custom script to generate CHANGELOG.md
Browse files Browse the repository at this point in the history
The conventional-commit-... tools don't work with Yarn v2,
so instead we generate the changelog with our own script.
  • Loading branch information
steabert committed Aug 14, 2020
1 parent 67caf91 commit ab53699
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 991 deletions.
62 changes: 18 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,35 @@
## [3.0.1](https://github.com/AxisCommunications/media-overlay-library-js/compare/v3.0.0...v3.0.1) (2020-06-17)
# Changelog

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

### Bug Fixes
## v3.0.1 (2020-06-17 10:06:37 +0200)

* do not render when width/height <= 0 ([8e6f459](https://github.com/AxisCommunications/media-overlay-library-js/commit/8e6f459555379bd0573688230bbf8afd74e1dd4e))
### Maintenance

- update CI to use NodeJS 14

### Bug fixes

# [3.0.0](https://github.com/AxisCommunications/media-overlay-library-js/compare/v2.0.0...v3.0.0) (2020-06-03)
- do not render when width/height <= 0

## v3.0.0 (2020-06-03 14:11:16 +0200)

* fix!: resize observer does not track SVG layout ([865789b](https://github.com/AxisCommunications/media-overlay-library-js/commit/865789b1155b92367c97b139ee5732a916cbcdf5))
### Bug fixes

- resize observer does not track SVG layout

### BREAKING CHANGES
## v2.0.0 (2020-05-08 12:41:20 +0200)

* the main wrapper element for
`Foundation` is changed from `svg` to `div`.
This affects the extra properties sent to the
`Foundation` component, as well as the forwarded
ref.



# [2.0.0](https://github.com/AxisCommunications/media-overlay-library-js/compare/v1.1.0...v2.0.0) (2020-05-08)


### Bug Fixes

* Add name to Text example ([149f1fa](https://github.com/AxisCommunications/media-overlay-library-js/commit/149f1fa98943258b24b2ba37b5134b2c434ad9e7))
* Example styling ([06c604d](https://github.com/AxisCommunications/media-overlay-library-js/commit/06c604d9a17309f946176a0f4e134ad44ada7d3d))
* Non draggable Circle throws error ([ca8e6e0](https://github.com/AxisCommunications/media-overlay-library-js/commit/ca8e6e0fa2fd5878211cd34e4490d8a36fee58f2))
### Maintenance

- explain the coordinate conversion idea

### Features

* compute width/height internally ([431969f](https://github.com/AxisCommunications/media-overlay-library-js/commit/431969f29800ed8c8e9f83e2c5e9718f198c086f))


### BREAKING CHANGES

* - `onReady` no longer passes `visibleArea`, but an object with
data to be able to compute any transformation (more generic).
Check the docs for `onReady` for an example how to compute the
visible area.
- `width` and `height` properties removed from `Foundation`,
you can still set the size for the <svg> element via CSS
(if auto size does not work for you).



# 1.1.0 (2020-04-05)


### Features

* first commit of media-overlay-library-js ([09f00a6](https://github.com/AxisCommunications/media-overlay-library-js/commit/09f00a6be745e2e4fdc95fe004d33e7c141de29c))

- compute width/height internally

### Bug fixes

- Add name to Text example
- Example styling
- Non draggable Circle throws error
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"build:esm": "tsc",
"build:bundle": "webpack --config webpack.config.js",
"dev": "webpack-dev-server --config webpack.example.js --hot",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"release": "yarn version --new-version `yarn node node_modules/.bin/conventional-recommended-bump -p angular`"
"version": "sbin/changelog.sh > CHANGELOG.md && git add CHANGELOG.md"
},
"peerDependencies": {
"pepjs": ">= 0.4.3 < 1",
Expand All @@ -50,8 +49,6 @@
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"babel-loader": "8.1.0",
"conventional-changelog-cli": "2.1.0",
"conventional-recommended-bump": "6.0.10",
"css-loader": "3.6.0",
"eslint": "7.6.0",
"eslint-config-typescript-shareable": "0.10.0",
Expand Down
31 changes: 31 additions & 0 deletions sbin/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

declare -A GROUP_TITLE=( ["fix"]="Bug fixes" ["chore"]="Maintenance" ["feat"]="Features" )

tags=$(git tag --list --sort='-version:refname' --merged HEAD)
set -- $tags

echo "# Changelog"
echo
echo "All notable changes to this project will be documented in this file."

while (( "$#" > 1 )); do
date=$(git log -1 --format="%ci" $1)
echo
echo "## $1 ($date)"
GROUP=""
git log --no-merges --date-order --format="%s" $2..$1^1 | sort | while read -r line
do
if [[ "$line" =~ ^(fix|feat|chore)(\(.*\))?!?:(.*)$ ]]; then
NEXT_GROUP=${BASH_REMATCH[1]}
if [[ $GROUP != $NEXT_GROUP ]]; then
GROUP=$NEXT_GROUP
echo
echo "### ${GROUP_TITLE[${GROUP}]}"
echo
fi
echo " - ${BASH_REMATCH[3]}"
fi
done
shift
done
Loading

0 comments on commit ab53699

Please sign in to comment.