From 6563b49d52a3c99622d95f3555ffac3e73ce14f6 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:10:53 +0100 Subject: [PATCH] chore: add CHANGELOG.md scripts --- CHANGELOG.md | 80 +++++++++++++++++++++++++++++++++++++++++--- cliff.toml | 52 ++++++++++++++++++++++++++++ scripts/changelog.sh | 12 +++++++ 3 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 cliff.toml create mode 100755 scripts/changelog.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index d3eb84b..919302a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,81 @@ 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.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.1.0](https://github.com/foundry-rs/block-explorers/releases/tag/v0.1.0) - 2023-11-14 +## [0.1.3](https://github.com/foundry-rs/compilers/releases/tag/v0.1.3) - 2024-01-05 -### Added +### Bug Fixes -- Initial release, forked from [`ethers-etherscan`](https://crates.io/crates/ethers-etherscan) -- Migrated to Alloy ([#2]) +- Dont force trailing url slash ([#25](https://github.com/foundry-rs/compilers/issues/25)) -[#2]: https://github.com/foundry-rs/block-explorers/pull/2 +### Miscellaneous Tasks + +- Release 0.1.3 + +### Other + +- Add `getcontractcreation` binding ([#24](https://github.com/foundry-rs/compilers/issues/24)) +- Fix deserialization error resulting from Blockscout omitting "OptimizationRuns" field when optimization was not used ([#23](https://github.com/foundry-rs/compilers/issues/23)) +- Fix deserialization failure when fetching contract source_code from blockscout ([#22](https://github.com/foundry-rs/compilers/issues/22)) + +## [0.1.2](https://github.com/foundry-rs/compilers/releases/tag/v0.1.2) - 2023-12-08 + +### Bug Fixes + +- Sanitize all source entries ([#19](https://github.com/foundry-rs/compilers/issues/19)) + +### Miscellaneous Tasks + +- 0.1.2 ([#20](https://github.com/foundry-rs/compilers/issues/20)) + +## [0.1.1](https://github.com/foundry-rs/compilers/releases/tag/v0.1.1) - 2023-11-23 + +### Dependencies + +- Bump Alloy + +### Miscellaneous Tasks + +- Release 0.1.1 +- [meta] Add CODEOWNERS + +## [0.1.0](https://github.com/foundry-rs/compilers/releases/tag/v0.1.0) - 2023-11-15 + +### Bug Fixes + +- Add licensing ([#4](https://github.com/foundry-rs/compilers/issues/4)) +- [features] Remove ethers-solc for foundry-compilers ([#3](https://github.com/foundry-rs/compilers/issues/3)) + +### Dependencies + +- Bump ethers ([#9](https://github.com/foundry-rs/compilers/issues/9)) + +### Documentation + +- Add CHANGELOG.md + +### Features + +- Remove Ethers ([#14](https://github.com/foundry-rs/compilers/issues/14)) +- Repo improvements ([#11](https://github.com/foundry-rs/compilers/issues/11)) +- Alloy migration ([#2](https://github.com/foundry-rs/compilers/issues/2)) +- [`CI`] Enable ci/cd ([#1](https://github.com/foundry-rs/compilers/issues/1)) +- Repo init + +### Miscellaneous Tasks + +- [meta] Update configs ([#15](https://github.com/foundry-rs/compilers/issues/15)) +- Remove RawAbi and LosslessAbi usage ([#12](https://github.com/foundry-rs/compilers/issues/12)) +- Enable more lints ([#13](https://github.com/foundry-rs/compilers/issues/13)) +- Remove default feats from openssl ([#7](https://github.com/foundry-rs/compilers/issues/7)) +- Patch ethers to be in sync w/ foundry ([#6](https://github.com/foundry-rs/compilers/issues/6)) +- Clippy ([#5](https://github.com/foundry-rs/compilers/issues/5)) + +### Other + +- Update README.md + +### Styling + +- Update rustfmt config ([#16](https://github.com/foundry-rs/compilers/issues/16)) + + \ No newline at end of file diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 0000000..8525279 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,52 @@ +# Configuration file for [`git-cliff`](https://github.com/orhun/git-cliff) +# See https://git-cliff.org/docs/configuration + +[changelog] +header = """ +# 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.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n +""" +# https://tera.netlify.app/docs/#introduction +body = """ +{% if version %}\ + ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/foundry-rs/compilers/releases/tag/v{{ version | trim_start_matches(pat="v") }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | title }} + {% for commit in commits %} + - {% if commit.scope %}[{{ commit.scope }}] {% endif %}{{ commit.message | upper_first | split(pat="\\n") | first }}\ + {% endfor %} +{% endfor %}\n +""" +trim = true +footer = "" + +[git] +conventional_commits = true +filter_unconventional = false +commit_preprocessors = [ + { pattern = '#(\d+)', replace = "[#$1](https://github.com/foundry-rs/compilers/issues/$1)" }, +] +commit_parsers = [ + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Bug Fixes" }, + { message = "^doc", group = "Documentation" }, + { message = ".*\\b([Dd]eps|[Dd]ependencies|[Bb]ump)\\b", group = "Dependencies" }, + { message = "^perf", group = "Performance" }, + { message = "^refactor", group = "Refactor" }, + { message = ".*\\b(style|fmt|format)\\b", group = "Styling" }, + { message = "^test", group = "Testing" }, + { message = "^chore", group = "Miscellaneous Tasks" }, + + { message = ".*", group = "Other" }, +] +protect_breaking_commits = false +filter_commits = false +tag_pattern = "v[0-9]*" +skip_tags = "beta|alpha" +ignore_tags = "rc" +sort_commits = "newest" diff --git a/scripts/changelog.sh b/scripts/changelog.sh new file mode 100755 index 0000000..1aa5796 --- /dev/null +++ b/scripts/changelog.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e -o pipefail + +root=$(dirname "$(dirname "$0")") +cmd=(git cliff --workdir "$root" --output "$root/CHANGELOG.md" "$@") + +if [ "$DRY_RUN" = "true" ]; then + echo "skipping due to dry run: ${cmd[*]}" >&2 + exit 0 +else + "${cmd[@]}" +fi \ No newline at end of file