Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add CHANGELOG.md scripts #26

Merged
merged 1 commit into from
Jan 10, 2024
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
80 changes: 75 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

<!-- generated by git-cliff -->
52 changes: 52 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -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 = "<!-- generated by git-cliff -->"

[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"
12 changes: 12 additions & 0 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -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